Getting started
What the Model API is and how to make your first call.
- Can I try SuperCosmos before writing any code?Yes. The Console Playground lets you chat with Flash, Max and Heavy, see tokens and cost, and copy the matching code.FAQ
- Can I use the Model API for a school project?Yes, with an account you're allowed to have. Start with the $5 free credit, keep your key secret and use Flash to keep costs low.FAQ
- How do I build a tiny chatbot with the Model API?A 20-line Python terminal chatbot: keep a message list, send it each turn, print the reply.How-to
- How do I make my first Model API call?Create a key with models:invoke, copy your Account ID, and send one request with cURL, Python or JavaScript.How-to
- How do I set environment variables for my key on Windows, macOS or Linux?Set CLATTER_API_KEY and CLATTER_ACCOUNT_ID in your shell or system settings so code can read them without hard-coding.How-to
- Is the Model API compatible with OpenAI?Yes, with the Chat Completions format: streaming, tools and usage work. Some endpoints and parameters aren't offered.FAQ
- Model API glossaryShort definitions of the terms used in the Model API docs: key, Account ID, model id, effort, usage, stream and more.Reference
- Model API quick referenceBase URL, headers, endpoints, model ids, prices, limits and error codes of the Model API on one page.Reference
- What do HTTP status codes like 401, 429 and 503 mean?The status code is a three-digit summary: 2xx success, 4xx a problem with your request, 5xx a problem on the server.Explainer
- What do I need before I can use the Model API?A Clatter Labs account, credits (new accounts get $5), a key with models:invoke and your Account ID.FAQ
- What is a base URL?The base URL is the web address your code sends requests to. For the Model API it's https://api.gateway.clatterlabs.xyz/v1.Explainer
- What is a request and a response?A request is what your program sends to the API; the response is what comes back: the answer, or an error.Explainer
- What is a token, and why does the Model API count them?Tokens are small pieces of text. The Model API bills input and output tokens at the model's price per 1M tokens.Explainer
- What is an SDK, and which one should I use?An SDK is a library that makes API calls easier. The official OpenAI SDKs for Python and JavaScript work with the Model API.Explainer
- What is JSON, and why does the Model API use it?JSON is a simple text format for data. Requests and responses to the Model API are JSON.Explainer
- What is the Clatter Labs Model API?The Model API lets your own code call SuperCosmos 1.1 in the OpenAI Chat Completions format, paid per token from credits.Explainer
- What is the Model API, explained simply?A plain-language explanation of the Model API for beginners: your program sends a message and gets SuperCosmos's answer back.Explainer
- What's the difference between the Model API and the Agent API?The Model API gives you raw SuperCosmos chat completions. The Agent API runs Cosmos Agent with its tools and cloud computer.Explainer
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.xyzFor deleting your whole account or the data of one service.