StartupAPI Docs

API Reference

Messages API

Use StartupAPI’s supported Messages transport with precise authentication and Anthropic request shapes.

Reading time: 5 minutesPOST /v1/messages.Last updated: August 21, 2026

Endpoint

StartupAPI supports the core Anthropic Messages request, response, and SSE event shapes used by Claude Code and direct API callers. Compatibility is limited to behavior implemented and verified by StartupAPI; optional Anthropic services and beta features can require additional gateway support.

MethodPath
POSThttps://startupapi.io/v1/messages

Authentication

StartupAPI requires your StartupAPI API key in Authorization: Bearer. X-Api-Key is not accepted by the StartupAPI authentication middleware. Missing, malformed, inactive, expired, or invalid keys are rejected before model usage is reserved.

HeaderValue
AuthorizationBearer YOUR_STARTUPAPI_API_KEY
content-typeapplication/json
anthropic-version2023-06-01 (recommended for copy/paste requests)

Example request

Non-streaming request
curl https://startupapi.io/v1/messages \
  -H "Authorization: Bearer YOUR_STARTUPAPI_API_KEY" \
  -H "content-type: application/json" \
  -H "anthropic-version: 2023-06-01" \
  -d '{
    "model": "claude-sonnet-4-6",
    "max_tokens": 1024,
    "messages": [
      { "role": "user", "content": "Hello, Claude." }
    ]
  }'

Representative response shape

JSON response
{
  "id": "msg_...",
  "type": "message",
  "role": "assistant",
  "model": "claude-sonnet-4-6",
  "content": [{ "type": "text", "text": "Hello." }],
  "stop_reason": "end_turn",
  "stop_sequence": null,
  "usage": {
    "input_tokens": 10,
    "cache_creation_input_tokens": 0,
    "cache_read_input_tokens": 0,
    "output_tokens": 4
  }
}

Streaming request

Streaming is enabled in production but is also controlled per API key. New keys currently receive streaming access; an older or restricted key can return a permission error until streaming is enabled for that key.

SSE request
curl --no-buffer https://startupapi.io/v1/messages \
  -H "Authorization: Bearer YOUR_STARTUPAPI_API_KEY" \
  -H "content-type: application/json" \
  -H "anthropic-version: 2023-06-01" \
  -d '{
    "model": "claude-sonnet-4-6",
    "max_tokens": 1024,
    "stream": true,
    "messages": [{ "role": "user", "content": "Hello, Claude." }]
  }'

Representative event sequence

SSE
event: message_start
data: {"type":"message_start","message":{"type":"message","usage":{"input_tokens":10,"output_tokens":0}}}

event: content_block_delta
data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Hello"}}

event: message_stop
data: {"type":"message_stop"}

Common body fields

FieldMeaning
modelA customer-accessible Claude model id (see Models).
messagesThe conversation so far, as role/content pairs.
max_tokensUpper bound on output tokens. The effective cap is the smaller of this and the model’s maximum.
streamOptional. When true, tokens arrive incrementally.

Upstream Routing

Lower-cost path

Claude Standard

StartupAPI Standard traffic is routed through Kiro via PayGo.

This is our lower-cost routing path for supported Claude models.

Fable route

Claude Max

StartupAPI Max traffic uses our dedicated Max routing infrastructure.

The underlying upstream provider and routing implementation are not publicly disclosed.

Max is the dedicated routing path for its exclusive model.

Claude Standard and Claude Max use separate routing paths.