All models, capabilities, and prices

POST /v1/messages

Anthropic-native chat completions. 100% identical request/response shape; tool_choice is the only normalization layer.

Request

http
POST https://api-ai.app/v1/messages
x-api-key: mdf-...
anthropic-version: 2023-06-01
content-type: application/json

{
  "model": "claude-sonnet-5-5",
  "max_tokens": 1024,
  "system": "You are a concise assistant.",
  "messages": [
    {"role": "user", "content": "Why is the sky blue?"}
  ]
}

Request body

Reference data
FieldTypeRequiredNotes
modelstringyesOne of the supported model IDs (Claude allowlist on /v1/messages)
messagesarrayyes{role, content} pairs
max_tokensintyesHard cap on output
systemstringnoSystem prompt
temperature0.0–1.0no
top_p0.0–1.0no
top_kintno
stop_sequencesarrayno
streamboolnoSee Streaming
toolsarraynoSee Tool use
tool_choiceobjectnoNormalized — see tools page

Prompt caching

Mark up to four cache breakpoints with cache_control: {"type": "ephemeral"} on text or system blocks. Cached tokens are billed at 10% of the normal input rate (and the upstream returns cache_read_input_tokens in usage).

json
{
  "model": "claude-sonnet-5-5",
  "max_tokens": 1024,
  "system": [
    {
      "type": "text",
      "text": "Long stable system prompt that should be cached...",
      "cache_control": {"type": "ephemeral"}
    }
  ],
  "messages": [{"role": "user", "content": "Question 1"}]
}

Response

json
{
  "id": "msg_01XYZ...",
  "type": "message",
  "role": "assistant",
  "model": "claude-sonnet-5-5",
  "content": [
    {"type": "text", "text": "Rayleigh scattering — short wavelengths..."}
  ],
  "stop_reason": "end_turn",
  "usage": {
    "input_tokens": 48,
    "output_tokens": 92,
    "cache_creation_input_tokens": 0,
    "cache_read_input_tokens": 0
  }
}
Anthropic compatibility
Request/response shape is byte-for-byte compatible with the Anthropic Messages API. If your existing code calls api.anthropic.com today, the only required change is base_url.
Last updated: October 2, 2026Found a bug? admin@minedom-france.fr