Skip to main content

Create an account and API key

Create a CometAPI account and API key before you call the API.
1

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.
CometAPI login page with Google, GitHub, and email sign-in options
2

Open API keys

After you sign in, open the API key page. You can also select API Keys in the dashboard sidebar.
3

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 API keys page with the Create API Key button and create dialog highlighted
4

Copy the API key

Click the copy button in the Key column. Store the copied key in a server-side environment variable or a local .env file. Do not paste a real API key into public repositories, frontend code, screenshots, or support tickets.
CometAPI API keys table with the copy button highlighted for a masked API key
Request examples read COMETAPI_KEY from your environment.

Store your API key locally

For local testing, export your API key as an environment variable:
read -rsp "CometAPI API key: " COMETAPI_KEY
printf '\n'
export COMETAPI_KEY

Base URL

Use this base URL for OpenAI-compatible SDKs and API calls:
https://api.cometapi.com/v1

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:
- base_url="https://api.openai.com/v1"
- api_key=os.environ["OPENAI_API_KEY"]
+ base_url="https://api.cometapi.com/v1"
+ api_key=os.environ["COMETAPI_KEY"]
CometAPI uses OpenAI-compatible request formats for common text, image, audio, and video workflows. If your app already uses the OpenAI SDK, start by changing the base URL and API key.

Make your first call

After you set COMETAPI_KEY in your environment, replace your-model-id with a current model ID from the Models page.
curl https://api.cometapi.com/v1/chat/completions \
  -H "Authorization: Bearer $COMETAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "your-model-id",
    "messages": [
      {
        "role": "user",
        "content": "Write a one-sentence bedtime story."
      }
    ]
  }'

Pick a model

Choose a model ID from the Models page, then pass that value in the model field.
GoalWhere to start
Chat or general textUse a GPT, Claude, Gemini, DeepSeek, or other chat model with Chat Completions.
Coding and reasoningUse a coding or reasoning model with Responses when the model requires the Responses API.
Image generationUse an image model with Create image or a provider-specific image guide.
Video generationUse a video model with the video API page that matches the provider workflow, such as Create video.

What is next

FAQ

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.
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.
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.
Use https://api.cometapi.com/v1 for OpenAI-compatible SDKs and endpoints such as /v1/chat/completions.
Yes. Create an OpenAI client, set api_key to your CometAPI API key, and set base_url to https://api.cometapi.com/v1.
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.
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.
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.
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.