Clatter LabsHelp Center

How do I switch existing OpenAI SDK code to the Model API?

How-toUpdated

Most Chat Completions code moves with four changes:

  1. Base URL: https://api.gateway.clatterlabs.xyz/v1
  2. Key: a Clatter Labs clsk_ key with models:invoke
  3. Header: X-Clatter-Account: CL-... as a default header
  4. Model: supercosmos-flash, supercosmos-max or supercosmos-heavy
client = OpenAI(
    base_url="https://api.gateway.clatterlabs.xyz/v1",
    api_key=os.environ["CLATTER_API_KEY"],
    default_headers={"X-Clatter-Account": os.environ["CLATTER_ACCOUNT_ID"]},
)

Check these before you ship#

  • Image inputs → not supported (text only).
  • n > 1, logprobs → not supported.
  • Embeddings, images, audio, files, Responses API → not available.
  • response_format → not documented; use tools with a schema.
  • Prices and limits differ; see How is a call billed?.

Good to know#

  • Every call shows in Console › Logs and Usage as Model API, with its price. See what you spent
  • New accounts get $5 of free credit; top up from $1 to $800 per purchase in Console › Billing › Credits. Billing
  • Keep keys on your server, never in a browser or mobile app. Why

Still need help?#

We usually reply within the first hour, and always within 24 hours. A full support team is with you.

Related articles

Still need help?

Tried the steps above and still stuck? Email us. We usually reply within the first hour, and always within 24 hours. A full support team is with you.

Infrastructure questions, or permanent deletion of your data
infrastructure@clatterlabs.xyz
For deleting your whole account or the data of one service.