CometAPI
Use CometAPI models with Agno agents.
v2.0.8
CometAPI is a platform for providing endpoints for large language models.
See all CometAPI supported models and pricing here.
Authentication
Set your COMETAPI_KEY environment variable. Get your API key from here.
export COMETAPI_KEY="your_value_here"Example
Install the openai package:
uv pip install -U agno openaiUse CometAPI with your Agent:
from agno.agent import Agent
from agno.models.cometapi import CometAPI
agent = Agent(model=CometAPI(), markdown=True)
# Print the response in the terminal
agent.print_response("Explain quantum computing in simple terms")
View more examples here.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
id | str | "gpt-5-mini" | The ID of the model to use |
name | str | "CometAPI" | The name of the model |
api_key | Optional[str] | None | The API key for CometAPI (defaults to COMETAPI_KEY env var) |
base_url | str | "https://api.cometapi.com/v1" | The base URL for the CometAPI |
CometAPI extends the OpenAI-compatible interface and supports most parameters from the OpenAI model.
Available Models
CometAPI provides access to 300+ AI models. You can fetch the available models programmatically:
from agno.models.cometapi import CometAPI
model = CometAPI()
available_models = model.get_available_models()
print(available_models)The helper returns an empty list when credentials are missing or a request/parsing error occurs; [] is not proof that the provider has no models.