Skip to content
NewRouters/Documentation
LLM API

Claude Opus 5 · API guide

Integrate claude-opus-5 through claude. Request examples, parameters, authentication and result handling.

POST/v1/messagesMODELclaude-opus-5
Official reference claude-opus-5Checked 2026-09-27Official docs
Code examples & responses
Request & responseExamples
POST/v1/messages
Server-side request
curl "https://newrouters.com/v1/messages" \
  -H "Content-Type: application/json" \
  -H "x-api-key: $API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  --data '{
  "model": "claude-opus-5",
  "max_tokens": 1024,
  "messages": [
    {
      "role": "user",
      "content": "Explain how an HTTP request works in three concise steps."
    }
  ],
  "stream": false
}'

The API origin is filled in. Set API_KEY before running. Examples never submit automatically.

ResponseSelected fields · illustrative values
200Successful result
JSON
{
  "content": [
    {
      "type": "text",
      "text": "..."
    }
  ],
  "stop_reason": "end_turn"
}
Integration flowAnthropic · Native protocol
  1. Prepare a request01
    API key + model ID

    Use the model’s native protocol and authentication.

    SDK / HTTP
  2. Call the native API02
    POST /v1/messages

    Submit the request structure documented on this page.

    Anthropic
  3. Read the response03
    content[]

    JSON returns a complete result; read SSE increments using native event formats.

    JSON / SSE

Use the exact API model ID claude-opus-5. This guide describes the platform contract; check the live catalog before calling the model.

The platform origin is filled in at build time. Set API_KEY to your server-side key before running.

Terminal window
curl "https://newrouters.com/v1/messages" \
-H "Content-Type: application/json" \
-H "x-api-key: $API_KEY" \
-H "anthropic-version: 2023-06-01" \
--data '{
"model": "claude-opus-5",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "Explain how an HTTP request works in three concise steps."
}
],
"stream": false
}'

This model uses the claude protocol. Read its native response and usage fields; do not wrap the request in the media task input envelope.

Supported endpoint templates:

  • POST /v1/messages
  • POST /v1/messages/count_tokens
LimitCatalog value
Context tokens1000000
Maximum output tokens128000

For streaming, use the native protocol streaming option and parse its events; check supported capabilities in the live catalog.

Checked: 2026-09-27 · Platform model: claude-opus-5 · Official reference: claude-opus-5

Check current availability, contract and account pricing before integration. Keep request IDs and usage receipts when diagnosing errors. Complete API reference