Docs
Compatibility

Migrate in one line

Switch an OpenAI or Anthropic app to Ablatic by changing three values

Moving an existing app to Ablatic is a config change. Point the SDK at Ablatic, swap the key, set the model. Your request and response code stays the same.

The change

Whether you come from OpenAI or Anthropic, the migration is the same three values: base URL, key, and model.

From OpenAI

client = OpenAI(
    base_url="https://api.ablatic.ai/v1",
    api_key="sk-ablatic-...",
)

resp = client.chat.completions.create(
    model="talos",
    messages=[{"role": "user", "content": "Hello"}],
)

From Anthropic

client = Anthropic(
    base_url="https://api.ablatic.ai",
    api_key="sk-ablatic-...",
)

resp = client.messages.create(
    model="talos",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello"}],
)

SDK to endpoint mapping

SDKBase URLEndpointAuth header
openaihttps://api.ablatic.ai/v1/v1/chat/completionsAuthorization: Bearer
anthropichttps://api.ablatic.ai/v1/messagesx-api-key

Model mapping

Send model="talos" and pick the reasoning mode with reasoning_effort: none/minimal for fast, low for brief thinking, medium for thinking, high/xhigh/max for thinking with a larger reasoning-token budget.

On the Anthropic-style surface, a model name that contains haiku, sonnet, or opus maps to fast and thinking by substring (opus gets the largest reasoning-token budget). This lets an unmodified Anthropic app run without touching the model string. Prefer talos for clarity once you control the config.

Two real divergences

Most code carries over unchanged. Two things differ by surface, so check them if you parse tool calls or error bodies directly.

Tool-call schema

The two surfaces shape tool calls differently. The SDK you use already matches its own surface, so this matters when you read the fields yourself.

  • OpenAI surface: tools declare function.parameters, and a returned call carries function.arguments as a JSON-encoded string. Parse the string to get the object.
  • Anthropic surface: tools declare input_schema, and a returned tool_use block carries input as a parsed object. No extra parsing step.

The tool_choice enums also differ. OpenAI uses required, Anthropic uses any.

Error JSON shape

Error bodies differ by surface. The OpenAI-style endpoints and the Anthropic-style endpoints return different JSON, so a shared error handler needs to branch on the surface. See Errors for both shapes and the status-code mapping.

Next