cicora.ai
API specificationClient code

SDKs and HTTP clients

Use different base URLs for OpenAI-style and Messages clients: they target one specification but compose paths differently.

Integration reference: choose parameters and available capabilities from your account API settings and the model catalogue for your environment.

Choose the client shape

OpenAI-style JavaScript, Python, and raw curl receive https://cicora.ai/api/v1 and append routes without a second /v1.

Messages SDKs and Claude Code receive the gateway root https://cicora.ai/api because they append /v1/messages themselves. The examples below show both shapes.

JavaScript OpenAI-style client
typescript
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://cicora.ai/api/v1",
  apiKey: process.env.CICORA_API_KEY,
});

const completion = await client.chat.completions.create({
  model: "openai/gpt-5.6-sol",
  messages: [{ role: "user", content: "Hello" }],
});
Python OpenAI-style client
python
from openai import OpenAI
import os

client = OpenAI(
    base_url="https://cicora.ai/api/v1",
    api_key=os.environ["CICORA_API_KEY"],
)

completion = client.chat.completions.create(
    model="openai/gpt-5.6-sol",
    messages=[{"role": "user", "content": "Hello"}],
)
Python Messages client
python
from anthropic import Anthropic
import os

client = Anthropic(
    base_url="https://cicora.ai/api",
    auth_token=os.environ["CICORA_API_KEY"],
)

message = client.messages.create(
    model="anthropic/claude-sonnet-5",
    max_tokens=500,
    messages=[{"role": "user", "content": "Hello"}],
)
JavaScript Messages client
typescript
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  baseURL: "https://cicora.ai/api",
  authToken: process.env.CICORA_API_KEY,
});

const message = await client.messages.create({
  model: "anthropic/claude-sonnet-5",
  max_tokens: 500,
  messages: [{ role: "user", content: "Hello" }],
});
Claude Code Messages gateway
bash
export ANTHROPIC_BASE_URL=https://cicora.ai/api
export ANTHROPIC_AUTH_TOKEN="$CICORA_API_KEY"
export ANTHROPIC_API_KEY=""

# The Messages client appends /v1/messages to the gateway root.
# Clear a preexisting API key so it cannot conflict with the Bearer token.

Integration boundary

  • Create one client per process or safe application boundary.
  • Pass timeout and AbortSignal from the calling workflow.
  • Return HTTP status and a structured error body to caller code.

Versions and updates

Do not apply the OpenAI-style base URL to a Messages SDK or append /v1 manually to its gateway root.

After a reference change, update the client and verify the main path through models before release.