Create an Anthropic-compatible message

Messages compatibility for text, image inputs, JSON output schemas, function tools and SSE. Accepts Authorization bearer or x-api-key. Uses the same metered gateway, routing and idempotency as Chat Completions. Native server tools, file IDs and signed thinking history are not supported; unsupported parameters return explicit errors.

post/messages

Request

  • Base URL: https://www.ninjachat.ai/api/v1
  • URL: https://www.ninjachat.ai/api/v1/messages
  • Auth: one of:
    • HTTP bearer
    • API key in header x-api-key

Headers

Idempotency-Keystring

Safely retry the same logical write without duplicate billing or execution.

Request body

modelstring required
max_tokensinteger required
streamboolean
temperaturenumber
top_pnumber
stop_sequencesstring[]

Response

Anthropic Message object or Messages SSE lifecycle.

object required

Changes

No recorded changes to this operation across all 1 revision of this API.