SuhadaCosme DOCS Get a key
API Documentation

One endpoint.
Three protocols.

SuhadaCosme serves China's frontier open-weight models through a single API that speaks OpenAI, Anthropic and Gemini natively. Point any existing client, SDK or agent harness at a new base URL — that's the whole migration. One key works for every model and every protocol.

01Get your key

Keys are provisioned personally during beta. Email hello@suhadacosme.com with a sentence about your workload — you're usually running within a day.

02Make your first call

terminal — first request
curl https://api.suhadacosme.com/v1/chat/completions \
  -H "Authorization: Bearer $SUHADA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5.3",
    "messages": [
      {"role": "user", "content": "Say hello in five languages."}
    ]
  }'

03Point your stack at it

Harness

Claude Code

Two env vars. Native Anthropic protocol.

Setup →
Harness

Codex CLI

One provider block in config.toml.

Setup →
Harness

OpenClaw

Custom provider in openclaw.json.

Setup →
Harness

Cline · Roo · aider

Any OpenAI-compatible client works.

Setup →

Authentication

One key, three native header styles. Use whichever your client already sends — no adapter, no shim.

ProtocolHow to pass the keyExample
OpenAIBearer tokenAuthorization: Bearer sk-...
AnthropicHeader + versionx-api-key: sk-...
anthropic-version: 2023-06-01
GeminiHeader or queryx-goog-api-key: sk-...
?key=sk-...

Keep keys server-side. All traffic is HTTPS-only. Need a rotation or a second key for staging? Email us — keys are managed manually during beta.

Models

The same model ID string works across all three protocols. Prices are USD per 1M tokens, cache-miss input / output.

Model IDContextInputOutputBest for
deepseek-v4-flash128K$0.14$0.28high-volume, latency-sensitive
deepseek-v4-pro128K$0.435$0.87deep reasoning on a budget
minimax-m31M$0.30$1.20long-context workhorse
glm-5.1200Ktieredtieredlean agentic coding
glm-5.21M$1.40$4.40long-horizon agents, 1M-ctx RAG
glm-5.31M$1.40$4.40hardest agentic & terminal work
kimi-k31M$3.00$15.00SWE — closing real tickets
qwen3.8-max1M$2.00$6.00all-round flagship MoE

List models over the API: GET /v1/models with your Bearer key.

OpenAI API protocol

Full Chat Completions compatibility. Any OpenAI SDK, in any language, works by changing base_url.

·Endpoints

MethodPathDescription
POST/v1/chat/completionsChat completions (stream & non-stream)
GET/v1/modelsList available models

·curl

openai · curl
curl https://api.suhadacosme.com/v1/chat/completions \
  -H "Authorization: Bearer $SUHADA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-pro",
    "messages": [{"role": "user", "content": "hello"}],
    "stream": false
  }'

·Python SDK

openai · python
from openai import OpenAI

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

resp = client.chat.completions.create(
    model="glm-5.3",
    messages=[{"role": "user", "content": "hello"}],
)
print(resp.choices[0].message.content)

·JavaScript / TypeScript SDK

openai · typescript
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.suhadacosme.com/v1",
  apiKey: process.env.SUHADA_KEY,
});

const resp = await client.chat.completions.create({
  model: "kimi-k3",
  messages: [{ role: "user", content: "hello" }],
});
console.log(resp.choices[0].message.content);

Anthropic API protocol

Native Messages API — drop-in for Claude SDKs and Claude Code itself. Send x-api-key plus anthropic-version.

·Endpoints

MethodPathDescription
POST/v1/messagesCreate a message (stream & non-stream)

·curl

anthropic · curl
curl https://api.suhadacosme.com/v1/messages \
  -H "x-api-key: $SUHADA_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5.2",
    "max_tokens": 1024,
    "system": "You are a precise senior engineer.",
    "messages": [{"role": "user", "content": "hello"}]
  }'

·Python SDK

anthropic · python
from anthropic import Anthropic

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

msg = client.messages.create(
    model="glm-5.3",
    max_tokens=1024,
    messages=[{"role": "user", "content": "hello"}],
)
print(msg.content[0].text)

Notemax_tokens is required by the Anthropic protocol. System prompts, tool use and streaming events follow the native Anthropic shapes.

Gemini API protocol

Native generateContent surface for Gemini / Vertex-shaped clients — no rewriting your pipeline.

·Endpoints

MethodPathDescription
POST/v1beta/models/{model}:generateContentSingle-turn / multi-turn generate
POST/v1beta/models/{model}:streamGenerateContent?alt=sseServer-sent events stream

·curl

gemini · curl
curl "https://api.suhadacosme.com/v1beta/models/kimi-k3:generateContent" \
  -H "x-goog-api-key: $SUHADA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [{"parts": [{"text": "hello"}]}]
  }'

·JavaScript SDK (@google/genai)

gemini · typescript
import { GoogleGenAI } from "@google/genai";

const ai = new GoogleGenAI({
  apiKey: process.env.SUHADA_KEY,
  httpOptions: { baseUrl: "https://api.suhadacosme.com" },
});

const resp = await ai.models.generateContent({
  model: "glm-5.3",
  contents: "hello",
});
console.log(resp.text);

The ?key= query parameter is accepted as an alternative to the x-goog-api-key header, matching Google's client conventions.

Streaming

All three protocols stream with server-sent events, in each protocol's native chunk shape.

  • OpenAI"stream": true; delta chunks terminate with data: [DONE]
  • Anthropic"stream": true; events from message_start through content_block_delta to message_stop
  • Gemini:streamGenerateContent?alt=sse; JSON chunks in data: frames

Client timeouts — set read/idle timeouts to 600 seconds for long generations, and disable response buffering in any proxy between you and us. First tokens typically arrive fast; thinking-heavy models may pause between reasoning and output.

Errors

Errors follow each protocol's native schema, so your existing error handling keeps working.

StatusOpenAI typeAnthropic typeMeaning
400invalid_request_errorinvalid_request_errorMalformed request or unknown parameter
401authentication_errorauthentication_errorMissing, invalid or revoked key
404invalid_request_errornot_found_errorUnknown model or path
429rate_limit_errorrate_limit_errorRate limit — back off and retry
500api_errorapi_errorUpstream failure — retry with backoff
503api_erroroverloaded_errorModel temporarily drained — retry or fail over
example · openai-shaped error
{
  "error": {
    "message": "Model glm-9 does not exist",
    "type": "invalid_request_error",
    "code": "model_not_found"
  }
}

Default rate limits are generous and scale with your plan. If you're hitting 429s, tell us your target RPM and we'll size your key accordingly.

Harness guides

Plug into your harness.

Agent harnesses and coding tools already speak one of our three protocols. Each guide below is a complete, verified configuration.

Claude Code

Claude Code talks the native Anthropic protocol — point it at SuhadaCosme with two environment variables.

·Environment variables

shell · add to ~/.bashrc or ~/.zshrc
export ANTHROPIC_BASE_URL="https://api.suhadacosme.com"
export ANTHROPIC_AUTH_TOKEN="sk-..."

# optional — pin the model (default follows your Claude Code settings)
export ANTHROPIC_MODEL="glm-5.3"

·Or persist it in settings

~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.suhadacosme.com",
    "ANTHROPIC_AUTH_TOKEN": "sk-...",
    "ANTHROPIC_MODEL": "glm-5.3"
  }
}

·Run

terminal
claude
# inside the session, switch models any time:
#   /model kimi-k3        (SWE specialist)
#   /model deepseek-v4-pro (deep reasoning, thin bill)

Verify — run claude and ask "which model are you?". If it answers as a GLM/Kimi/DeepSeek model, you're on SuhadaCosme.

Codex CLI

Codex supports any OpenAI Chat-Completions-compatible provider via model_providers.

·~/.codex/config.toml

~/.codex/config.toml
# ~/.codex/config.toml
model = "suhada/glm-5.3"
model_provider = "suhada"

[model_providers.suhada]
name = "SuhadaCosme"
base_url = "https://api.suhadacosme.com/v1"
env_key = "SUHADA_API_KEY"
wire_api = "chat"

·Run

terminal
export SUHADA_API_KEY="sk-..."
codex                      # uses suhada/glm-5.3 from config
codex --model suhada/kimi-k3  # override per-run

Notesbase_url must end in /v1 with no trailing slash; wire_api = "chat" selects the Chat Completions wire format. If you only want the built-in OpenAI provider redirected, openai_base_url works too.

OpenClaw

Add SuhadaCosme as a custom provider in openclaw.json (legacy path ~/.clawdbot/clawdbot.json is symlinked automatically).

·~/.openclaw/openclaw.json

~/.openclaw/openclaw.json
{
  "models": {
    "providers": {
      "suhada": {
        "baseUrl": "https://api.suhadacosme.com/v1",
        "apiKey": "sk-...",
        "api": "openai-completions",
        "models": [
          { "id": "glm-5.3" },
          { "id": "glm-5.2" },
          { "id": "kimi-k3" },
          { "id": "deepseek-v4-pro" }
        ]
      }
    }
  }
}

·Select the model

terminal · openclaw CLI
openclaw models set suhada/glm-5.3
# or pick it interactively from the models list

Per-agent override — a specific agent can carry its own provider/model via ~/.openclaw/agents/<agent>/agent/models.json; empty fields fall back to the config above.

Cline / Roo Code

Both VS Code extensions have a built-in "OpenAI Compatible" provider — no config files needed.

  • API Provider — choose OpenAI Compatible in the extension's settings panel
  • Base URLhttps://api.suhadacosme.com/v1
  • API Key — your SuhadaCosme key
  • Model ID — e.g. glm-5.3 or kimi-k3

Roo Code follows the same flow in its provider dropdown. Enable streaming in the panel for long generations.

aider

aider's OpenAI-compatible mode takes the base URL as a flag or environment variable.

terminal
export OPENAI_API_BASE="https://api.suhadacosme.com/v1"
export OPENAI_API_KEY="sk-..."

aider --model openai/glm-5.3
# strong SWE pair:
aider --model openai/kimi-k3 --edit-format diff

Model prefix — aider needs the openai/ prefix to route through its OpenAI-compatible driver; the part after the slash is the SuhadaCosme model ID.

Hermes

Hermes speaks the OpenAI protocol for model backends. In your provider/model config, set:

  • Endpoint / Base URLhttps://api.suhadacosme.com/v1
  • API key — your SuhadaCosme key, passed as Bearer
  • Model — any catalog ID, e.g. glm-5.2 for long-horizon agent loops

Anything else that speaks OpenAI, Anthropic or Gemini — LangChain, LlamaIndex, Continue, your own backend — works the same way: base URL + key + model ID.

FAQ

  • One key for all protocols? — Yes. The same key authenticates OpenAI, Anthropic and Gemini surfaces.
  • Same model across protocols? — Yes, identical model IDs and identical serving paths; pick the protocol your client already speaks.
  • Tool calling / function calling? — Supported through each protocol's native tool-use shapes.
  • Which model should I start with?glm-5.3 for agentic coding, deepseek-v4-pro for deep reasoning at minimum cost, deepseek-v4-flash for volume.
  • Need a limit raised, a second key, or a model not listed? — hello@suhadacosme.com — we're fast.