Create an account and API key
Create a CometAPI account and API key before you call the API.Sign in or create an account
Open the CometAPI login page. Continue with Google, continue with GitHub, or enter your email or username. If you do not have an account, complete account creation from this page.

Open API keys
After you sign in, open the API key page. You can also select API Keys in the dashboard sidebar.
Create an API key
Click Create API Key, enter a clear name such as 
local-test, and keep Unlimited Quota enabled for a first test unless you want to set a spending cap. Click Create.
COMETAPI_KEY from your environment.
Store your API key locally
For local testing, export your API key as an environment variable:Base URL
Use this base URL for OpenAI-compatible SDKs and API calls:30-second switch from OpenAI
After you have a CometAPI API key, use this two-setting diff when you switch an OpenAI SDK client to CometAPI:Make your first call
After you setCOMETAPI_KEY in your environment, replace your-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 create a CometAPI account?
How do I create a CometAPI account?
Open the CometAPI login page, then continue with Google, continue with GitHub, or enter your email or username. If you do not have an account, complete account creation from the same page.
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 Create API Key, enter a name, click Create, and copy the generated API key. Use
$COMETAPI_KEY in examples instead of a real API key.Where should I store my API key?
Where should I store my API key?
Store your API key in a server-side environment variable or a local
.env file. Do not commit it to public repositories, paste it into frontend code, include it in screenshots, or send it in support tickets.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.
