Documentation Index
Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt
Use this file to discover all available pages before exploring further.
30-second switch from OpenAI
Use this two-setting diff when you switch an OpenAI SDK client to CometAPI:Get your API key
To create your CometAPI API key, follow these steps:- Open the CometAPI dashboard.
- In the dashboard, open the API key page.
- Click Add Token.
- Copy the API key and store it in your app or local environment.
Base URL
Use this base URL for OpenAI-compatible SDKs and API calls:Make your first call
Replaceyour-model-id with a current model ID from the Models page.
Pick a model
Choose a model ID from the Models page, then pass that value in themodel field.
| Goal | Where to start |
|---|---|
| Chat or general text | Use a GPT, Claude, Gemini, DeepSeek, or other chat model with Chat Completions. |
| Coding and reasoning | Use a coding or reasoning model with Responses when the model requires the Responses API. |
| Image generation | Use an image model with Create image or a provider-specific image guide. |
| Video generation | Use a video model with the video API page that matches the provider workflow, such as Create video. |
What is next
- For request failures, see Error Codes & Handling.
- For retry guidance, see how to handle rate limits.
- For model-specific usage, start with Chat Completions, Responses, Create image, or Create video.
- For billing details, see About Pricing.
- For help, see the Help Center or contact CometAPI support.
FAQ
How do I get a CometAPI API key?
How do I get a CometAPI API key?
Open the API key page in the CometAPI dashboard, click Add Token, and copy the generated API key. Use
<COMETAPI_KEY> in examples instead of a real API key.What is the CometAPI base URL for API calls?
What is the CometAPI base URL for API calls?
Use
https://api.cometapi.com/v1 for OpenAI-compatible SDKs and endpoints such as /v1/chat/completions.Does CometAPI work with the OpenAI Python SDK?
Does CometAPI work with the OpenAI Python SDK?
Yes. Create an
OpenAI client, set api_key to your CometAPI API key, and set base_url to https://api.cometapi.com/v1.How do I switch from OpenAI to CometAPI?
How do I switch from OpenAI to CometAPI?
Change the base URL to
https://api.cometapi.com/v1, replace the API key with your CometAPI API key, and use a CometAPI model ID from the Models page.Which model ID should I use first?
Which model ID should I use first?
Choose the model ID by use case. Start from the Models page, then select a chat, coding, image, or video model that matches the API page that you plan to call.
Which programming languages does CometAPI support?
Which programming languages does CometAPI support?
CometAPI works with any programming language that can send HTTPS requests. Start with the curl, Python, and Node.js examples on this page, or use an OpenAI-compatible SDK that lets you override the base URL.
Does CometAPI offer a free trial or free API key?
Does CometAPI offer a free trial or free API key?
You can create a CometAPI API key from the dashboard. To check free trial availability, free trial credits, and billing details, see the CometAPI pricing page and About Pricing.