Choose a text API
Chat Completions
Send OpenAI-compatible chat messages with a messages array.
Responses
Use reasoning, multimodal output, and built-in tools through the Responses API.
Anthropic Messages
Call Claude-compatible Messages workflows with provider-native fields.
Gemini content generation
Send Gemini native content generation requests.
Call a text model
Use any text-capable model ID from the Models page or the model directory. The examples below call the OpenAI-compatible Chat Completions endpoint.These examples use the placeholder
your-model-id. Replace it with an available text model ID from the Models page or model directory before you run the request.Response example
A successful response can look like this. Field values vary by model and request:Example model records
This example model catalog response shows the
/api/models envelope and one text model record shape. It is not a complete model list.cURL
Common errors
Missing or invalid API key
Missing or invalid API key
Send
Authorization: Bearer $COMETAPI_KEY.Wrong base URL
Wrong base URL
Use
https://api.cometapi.com/v1 for OpenAI-compatible requests.Wrong model type
Wrong model type
Choose a text-capable model from the Models page.
Provider-specific parameter error
Provider-specific parameter error
Remove optional fields, then add the fields back one at a time.
Error codes and retry strategy
400
400
Do not retry until the request body is fixed.
401
401
Do not retry until the API key is present and valid.
404
404
Check the base URL, path, and model ID before retrying.
429
429
Retry with exponential backoff and reduce concurrency.
500 or 503
500 or 503
Retry with backoff for transient provider or service errors.
Pricing and model directory
Models page
Read how CometAPI exposes model IDs in the docs.
Model directory
Browse model availability and capabilities.
Pricing
Check pricing before you call a model.