Skip to main content
POST
/
spotlight
/
anthropic
/
v1
/
messages
Send Messages
curl --request POST \
  --url https://api.app.shinzo.ai/spotlight/anthropic/v1/messages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "messages": [
    {}
  ],
  "max_tokens": 123,
  "metadata": {},
  "stream": true
}
'

Documentation Index

Fetch the complete documentation index at: https://docs.shinzo.ai/llms.txt

Use this file to discover all available pages before exploring further.

Send Messages

Forward message requests to Anthropic’s Claude API through Spotlight. All requests are automatically tracked for analytics.

Authentication

Requires JWT token or Platform API key:
Authorization: Bearer <jwt_token_or_api_key>
# or
x-shinzo-api-key: <api_key>

Provider Credentials

Provider credentials can be supplied in two ways:
  1. Stored credentials: If you have saved a provider key, it will be used automatically
  2. Pass-through header: Include the provider’s API key directly:
x-api-key: sk-ant-api03-...
The request body follows Anthropic’s Messages API format. See Anthropic’s documentation for full details.
model
string
required
Model to use (e.g., claude-sonnet-4-20250514)
messages
array
required
Array of message objects
max_tokens
integer
required
Maximum tokens to generate
metadata
object
Metadata including user_id for session tracking
stream
boolean
Enable streaming responses

Example Request

curl -X POST https://api.app.shinzo.ai/spotlight/anthropic/v1/messages \
  -H "Authorization: Bearer <jwt_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-20250514",
    "max_tokens": 1024,
    "messages": [
      {"role": "user", "content": "Hello, Claude!"}
    ],
    "metadata": {
      "user_id": "my-app-session-123"
    }
  }'

Response

Standard Anthropic Messages API response:
{
  "id": "msg_abc123",
  "type": "message",
  "role": "assistant",
  "content": [
    {
      "type": "text",
      "text": "Hello! How can I help you today?"
    }
  ],
  "model": "claude-sonnet-4-20250514",
  "stop_reason": "end_turn",
  "usage": {
    "input_tokens": 12,
    "output_tokens": 15
  }
}

Streaming

Enable streaming by setting stream: true:
curl -X POST https://api.app.shinzo.ai/spotlight/anthropic/v1/messages \
  -H "Authorization: Bearer <jwt_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-20250514",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Hello!"}],
    "stream": true
  }'
Streaming responses use Server-Sent Events (SSE) format.

Session Tracking

Use the metadata.user_id field to group requests into sessions:
{
  "metadata": {
    "user_id": "user-123-session-456"
  }
}
Sessions are then available in Session Analytics.

Timeout

Request timeout is 3 minutes (180,000ms) to accommodate long-running generations.

Status Codes

CodeDescription
200Success
400Invalid request
401Invalid authentication
403Provider key not found or feature not enabled
429Rate limit exceeded
500Internal error or provider error