DocsClaude Opus 4.5 API usage and code examples

Claude Opus 4.5 API usage and code examples

Base URL, authentication, endpoints, and code examples for calling Claude Opus 4.5 (model ID: claude-opus-4-5) through the API.

Model details

Model IDclaude-opus-4-5
ProviderAnthropic
TypeText
StatusAvailable
Context length200,000 tokens
Processing regionGlobal
PricingSee the model page

Base URL and authentication

FormatBase URLKey header
OpenAIhttps://token.echohub.io/v1Authorization: Bearer
Anthropichttps://token.echohub.iox-api-key / Authorization: Bearer

Create an API key in the console and put it in the ECHO_API_KEY environment variable.

Endpoints

Method and pathWhat it does
POST /v1/chat/completionsGenerate a chat reply (Chat Completions API)
POST /v1/responsesGenerate a response (Responses API)
POST /v1/messagesGenerate a chat reply (Messages API)

Call examples

The same model ID works with both the OpenAI and Anthropic formats.

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://token.echohub.io/v1",
    api_key=os.environ["ECHO_API_KEY"],
)

res = client.chat.completions.create(
    model="claude-opus-4-5",
    messages=[{"role": "user", "content": "Hello"}],
)
print(res.choices[0].message.content)

Related docs