Create a message
Compatible with Anthropic Messages, for inference on conversational models. The official SDK works as-is.
post/v1/messages
Request
- Base URL: https://gateway.amux.ai
- URL: https://gateway.amux.ai/v1/messages
- Auth: API key in header x-api-key
Headers
Content-Typestring required
Always application/json.
Request body
Example request
{
"model": "anthropic/claude-opus-5",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "Hello!"
}
]
}Response
Inference succeeded. model is the canonical ID — the same value you sent.
Example response
{
"id": "msg_01ABC",
"type": "message",
"role": "assistant",
"model": "anthropic/claude-opus-5",
"content": [
{
"type": "text",
"text": "Hello!"
}
],
"stop_reason": "end_turn"
}Changes
No recorded changes to this operation across all 1 revision of this API.