Create a message (Anthropic-compatible wire format).
Create a message (Anthropic-compatible wire format).
Authorization
NRouterApiKey AuthorizationBearer <token>
Your nRouter virtual key (sk-nrouter-…). Sent as Authorization: Bearer sk-nrouter-….
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/messages" \ -H "Content-Type: application/json" \ -d '{ "model": "string", "messages": [ {} ], "max_tokens": 0 }'{ "id": "msg_01", "type": "message", "role": "assistant", "content": [ { "type": "text", "text": "Hello!" } ], "usage": { "input_tokens": 9, "output_tokens": 3 }}Was this page helpful?