Messages (Anthropic-compatible)
The Anthropic Messages API, so Claude Code and the Anthropic SDKs work with a Runcrate key and Runcrate model ids. Same billing, limits and models as chat completions. Errors use Anthropic’s shape: {type: error, error: {type, message, code}}.
Authorizations
Use a Runcrate API key with the rc_live_* prefix as the bearer token. Create one at https://www.runcrate.ai/dashboard/api-keys.
Body
A Runcrate model id (e.g. deepseek-ai/DeepSeek-V4.1-Flash). Claude model names such as claude-sonnet-4-5 are not Runcrate ids and answer 404.
Turns with role (user or assistant) and content: a string, or blocks of type text, image (base64 or url source), document (text source), tool_use and tool_result (with is_error). thinking blocks sent back are accepted and not passed to the model.
A string or text blocks; cache_control is kept.
x >= 1Custom tools with name, description and input_schema.
{type: auto | any | tool | none}; tool takes name; disable_parallel_tool_use is honored.
{type: enabled, budget_tokens} sets the reasoning effort: under 4,096 low, under 16,384 medium, else high. output_config.effort takes precedence.
Accepted and never sent to the model.
Response
A message (or an SSE stream of message_start, content_block_start, content_block_delta, content_block_stop, message_delta, message_stop and ping events when stream=true).
message assistant thinking, then text, then tool_use blocks (with parsed input).
end_turn, max_tokens, stop_sequence, tool_use, refusal