anyllm.space
Main navigation
← All models and rates
Anthropic

Claude Sonnet 5.5

anthropic/claude-sonnet-5.5

A text model for daily development, coding assistants and chat workflows.

POST /v1/chat/completions · Input and output tokens
Checking current rates…

API examples

Store the API key in an environment variable and reuse one idempotency key for retries of the same request.

1from openai import OpenAI
2import os
3
4client = OpenAI(
5 base_url="https://api.anyllm.space/v1",
6 api_key=os.environ["ANYLLM_API_KEY"],
7 max_retries=0,
8)
9
10res = client.chat.completions.create(
11 model="anthropic/claude-sonnet-5.5",
12 max_tokens=1000,
13 messages=[{"role": "user", "content": "Summarize the specification"}],
14 extra_headers={
15 "X-Max-Cost-Rub": "1.50",
16 "X-Client-Reference": "project-01",
17 "Idempotency-Key": "req-001",
18 },
19)

Related models