Anthropic

Create an Anthropic-compatible message

Changed on

Accepts Anthropic Messages requests, including video blocks for models that advertise video input. Authenticate with an API key using the Authorization: Bearer header or the x-api-key header.

post/v1/messages

Request

  • Base URL
    https://nano-gpt.com/api
  • URL
    https://nano-gpt.com/api/v1/messages
  • Auth
    • HTTP bearer
    • or API key in header x-api-key

Request body

modelstring required

Model ID or compatibility alias. Append :reasoning-effort/<effort>, where effort is none, low, medium, high, xhigh, or max, to supply a default output_config.effort for enabled reasoning levels; none instead supplies thinking: { type: "disabled" }. The suffix is stripped before model routing and is not listed as a separate model. Explicit reasoning generation settings take precedence, including enabled thinking when the suffix is none. The none suffix requests disabled reasoning where supported; it does not bypass model/provider restrictions. Other effort levels remain model/provider-specific.

max_tokensinteger

Response

Anthropic message response

idstring
typestring
rolestring
modelstring
contentobject[]
stop_reasonstring nullable
usageobject

Changes