Messages
Request structures for Anthropic and OpenAI modes.
Messages
Model Gate preserves the compatible Anthropic Messages and OpenAI Chat Completions request formats.
Anthropic Messages
{"model":"claude-opus-4.8","max_tokens":1024,"messages":[{"role":"user","content":"Hello"}]}
The endpoint also supports system prompts, thinking, tools, vision blocks, and prompt caching when supported by the model.
OpenAI Chat Completions
{"model":"claude-opus-4.8","messages":[{"role":"system","content":"You are a coding assistant."},{"role":"user","content":"Hello"}],"temperature":0.7,"max_tokens":1024}
Tool calling uses the standard OpenAI tools array. For streaming, see Streaming. To estimate Anthropic input size, use `count_tokens`.