Skip to main content

Messages

POSThttps://api.stdcmpt.com/v1/messages

The Anthropic Messages API. Claude Code and the Anthropic SDKs use this endpoint. For Claude Code, see the Claude Code guide.

Request​

Set the Anthropic SDK's base URL to https://api.stdcmpt.com (without /v1):

import os
from anthropic import Anthropic

client = Anthropic(
base_url="https://api.stdcmpt.com",
api_key=os.environ["STANDARDCOMPUTE_API_KEY"],
)

message = client.messages.create(
model="anthropic/claude-standardcompute",
max_tokens=1024,
messages=[{"role": "user", "content": "Review this function for bugs: ..."}],
)

print(message.content[0].text)

Authenticate with x-api-key or Authorization: Bearer.

Models​

  • anthropic/claude-standardcompute or standardcompute: smart routing.
  • An exact ID such as anthropic/claude-sonnet-5: that model only.
  • Older Claude Code names (sonnet, opus, haiku and legacy dated IDs): smart routing, so existing setups keep working.

With smart routing, the response's model field echoes the model you requested.

Supported features​

  • Streaming with standard Anthropic server-sent events.
  • Tool use with client-defined tools that have an input_schema. Anthropic server tools are ignored.
  • Images in message content, on vision models.
Not supported

The thinking parameter is ignored and responses don't include thinking blocks. Smart pacing delays are not applied on this endpoint.

Count tokens​

POSThttps://api.stdcmpt.com/v1/messages/count_tokens

Returns an estimated input token count for a Messages request body:

{ "input_tokens": 1834 }

The count is an estimate based on request size, not an exact tokenizer count.