> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# CometAPI

> Use CometAPI models with Agno agents.

v2.0.8 (Introduced in v2.0.8)

CometAPI is a platform for providing endpoints for large language models.

See all CometAPI supported models and pricing [here](https://www.cometapi.com/pricing/).

## Authentication

Set your `COMETAPI_KEY` environment variable. Get your API key from [here](https://www.cometapi.com/console/token).

```bash Mac theme={null}
export COMETAPI_KEY=***
```

```bash Windows theme={null}
setx COMETAPI_KEY ***
```

## Example

Install the `openai` package:

```shell theme={null}
uv pip install -U agno openai
```

Use `CometAPI` with your `Agent`:

```python agent.py theme={null}
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")

```

> [!NOTE]
>
> View more examples [here](https://agno-v2.mintlify.site/models/providers/gateways/cometapi/usage/basic-stream.md).

## 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](https://agno-v2.mintlify.site/models/providers/native/openai/completion/overview.md).

## Available Models

CometAPI provides access to 300+ AI models. You can fetch the available models programmatically:

```python theme={null}
from agno.models.cometapi import CometAPI

model = CometAPI()
available_models = model.get_available_models()
print(available_models)
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.