← All docs

Endpoints

Create a message

POST/v1/messages

Loading models…

Creates a message in the Anthropic Messages format. The Anthropic SDK and Claude Code work with base URL https://api.everyais.com.

Body

modelstringYes
Model ID
messagesarrayYes
role: user or assistant. content: a string or blocks (text, image, tool_use, tool_result, thinking, document)
systemstring | arrayNo
A string or text blocks
temperaturenumberNo
0–1
top_pnumberNo
0–1
top_kintegerNo
Positive integer
stop_sequencesstring[]No
Up to 8
streambooleanNo
Default false
toolsarrayNo
{name, description, input_schema}
tool_choiceobjectNo
{"type":"auto"|"any"|"none"} or {"type":"tool","name":"..."}. Models that reject forced tool use in Chat also reject any and tool
metadataobjectNo
{"user_id": "..."}, passed through as Anthropic metadata
thinkingobjectNo
{"type":"enabled","budget_tokens":N} (N ≥ 1024), {"type":"adaptive"} or {"type":"disabled"}
output_configobjectNo
effort (low–max, with adaptive or omitted thinking) and format ({"type":"json_schema","schema":{...}}, structured-output models only)
everyaisobjectNo
Gateway options such as caching and parameter_policy

Model options

Pick a model at the top of this page, or read capabilities, limits and parameter_constraints from GET /v1/models. Parameter policy decides whether unsupported values are adjusted or rejected with 400.

  • document blocks and tool_result blocks with images return 400.
  • Send images with source.type: "base64". url sources follow the Chat image URL rules.
  • cache_control on a block is passed through unchanged. See prompt caching.
  • To continue a tool conversation, send the response content blocks back unchanged, including thinking blocks. Gemini's tool signature is in the thinking block's signature.
  • stop_reason: "stop_sequence" and stop_sequence are returned when the provider reports the matched string (Claude and vLLM-based models). Gemini and GPT return end_turn.
  • Web search is available only in Chat.

POST /v1/messages/count_tokens

Counts input tokens for free. Claude Code calls it automatically. The body is the same as /v1/messages, and the count is an estimate.

json
{
  "input_tokens": 1234
}
Contact support