Anthropic Messages
Creates a model response using an Anthropic-compatible Messages request.
身份验证
X-API-Keystring
Use X-API-Key: $JOY_TOKEN_API_KEY.
请求头
X-Request-ID
Optional request identifier for log, billing, and debugging correlation.
请求
This endpoint expects an object.
model
Must be auto. Concrete model IDs are not accepted.
max_tokens
Maximum number of output tokens.
messages
system
stream
Return an Anthropic-compatible SSE stream when true.
temperature
Sampling temperature forwarded to the selected provider when supported.
tools
响应头
X-DAOE-Failover
Present on streaming responses when provider failover occurred.
响应
Successful Anthropic-compatible message response.
id
type
role
model
content
stop_reason
stop_sequence
usage
metadata
JoyToken routing and billing metadata appended by the gateway when available. In orchestration (multi-task planning) mode this object also carries per-task identifiers, and the response returns one metadata object per task.
错误
400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
429
Too Many Requests Error
500
Internal Server Error
