Create Anthropic-compatible message
Anthropic-compatible Messages invocation. Authorization Bearer is recommended; x-api-key is accepted only for SDK compatibility.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Optional caller request id.
Anthropic API version.
Anthropic SDK-compatible API key header. Prefer Authorization: Bearer for MyRouter.
Body
Public MyRouter model id exposed through Anthropic-compatible API.
Anthropic-style input messages.
1Maximum output tokens.
x >= 1Whether to stream SSE events.
System prompt content.
Stop sequences.
Sampling temperature.
Nucleus sampling value.
Top-k sampling value.
Anthropic tool definitions.
Tool choice.
Customer metadata.
Response
Create Anthropic-compatible message response.
Message id.
Anthropic response type.
Assistant role.
Output content blocks.
Public MyRouter model id.
Why generation stopped.
Runtime usage facts, not invoice-grade charge evidence.