Create Message
Anthropic Messages API compatibility endpoint for Claude Code and other clients
Overview
The Messages API provides compatibility with the Anthropic Messages API format. It’s designed primarily for clients that expect Anthropic’s API structure, such as Claude Code and other tools built for Claude’s API.Body
10 < x <= 9007199254740991Model identifier. Use /v1/models to list all available models. Supports canonical names (e.g. gpt-5.2, claude-opus-4-6), aliases, and provider-prefixed formats (e.g. openai/gpt-5.2). Use "auto" for automatic model selection.
One of 4043 allowed values.
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
0 <= x <= 1- Option 1
- Option 2
- Option 3
- Option 1
- Option 2
- Option 3
- Option 4
- Option 1
- Option 2
0 <= x <= 10 < x <= 9007199254740991Response
Default Response
message assistant - Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
end_turn, max_tokens, stop_sequence, tool_use, pause_turn, refusal