Documentation Index
Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt
Use this file to discover all available pages before exploring further.
Overzicht van opdrachten
| Command | Description | Auth |
|---|
chat [MESSAGE] | Verstuur een bericht of start interactieve REPL | API-sleutel |
models | Beschikbare modellen weergeven en doorzoeken | API-sleutel |
balance | Accountsaldo weergeven | API-sleutel (of access token) |
account | Accountprofiel weergeven | Access token |
stats | Gebruiksstatistieken weergeven | Access token |
tokens | Je API-sleutels weergeven en doorzoeken | Access token |
logs | Gebruikslogs bekijken met filters | Access token |
tasks | Async taaklogs weergeven | Access token |
init | Interactieve configuratiewizard | — |
doctor | Diagnostiek en gezondheidscontroles uitvoeren | API-sleutel |
config | CLI-configuratie beheren | — |
repl | Interactieve opdrachtshell starten | API-sleutel |
Opdrachten gemarkeerd met Access token vereisen de omgevingsvariabele COMETAPI_ACCESS_TOKEN of de configuratiesleutel access_token. Zie de configuratiegids voor details.
Chat
Verstuur één bericht of start de interactieve REPL met meerdere beurten.
# Single message (streaming by default)
cometapi chat "Explain quantum computing in one sentence"
# Override model and add a system prompt
cometapi chat "Summarize this" --model claude-sonnet-4-6 --system "Be concise"
# Disable streaming
cometapi chat "Hello" --no-stream
# JSON output (full API response)
cometapi chat "Hello" --json
# Interactive REPL (omit message)
cometapi chat
| Option | Short | Description |
|---|
--model | -m | Te gebruiken model (standaard: uit config) |
--system | -s | System prompt |
--temperature | -t | Sampling temperature (0.0–2.0) |
--max-tokens | | Max tokens in response |
--stream/--no-stream | | Streaming inschakelen of uitschakelen (standaard: stream) |
--format | -f | Uitvoerformaat |
--json | | Uitvoer als JSON |
Models
Beschikbare modellen weergeven met optionele zoekopdracht en limiet.
# List all models
cometapi models
# Search by keyword
cometapi models --search gemini
# Limit results and output as JSON
cometapi models --search gpt --limit 10 --json
| Option | Short | Description |
|---|
--search | -s | Modellen filteren op trefwoord |
--limit | -l | Maximum aantal resultaten |
--format | -f | Uitvoerformaat |
--json | | Uitvoer als JSON |
Balance
Je CometAPI-accountsaldo weergeven.
# Default: account-level balance (falls back to per-key billing)
cometapi balance
# Force account-level view
cometapi balance --source account
# Force API key billing view
cometapi balance --source key
# JSON output
cometapi balance --json
| Option | Short | Description |
|---|
--source | -s | Gegevensbron: account (volledig account) of key (huidige API-sleutel). |
--format | -f | Uitvoerformaat |
--json | | Uitvoer als JSON |
Account
Je accountprofiel weergeven. Vereist een access token.
cometapi account
cometapi account --json
| Option | Short | Description |
|---|
--format | -f | Uitvoerformaat |
--json | | Uitvoer als JSON |
Stats
Gebruiksstatistieken voor de huidige maand weergeven. Vereist een access token.
cometapi stats
cometapi stats --json
De uitvoer bevat: aantal aanvragen, gebruiksbedrag, slagingspercentage en voorspeld aantal resterende dagen saldo.
| Option | Short | Description |
|---|
--format | -f | Uitvoerformaat |
--json | | Uitvoer als JSON |
Tokens
Je API-sleutels weergeven en doorzoeken. Vereist een access token.
# List API keys (paginated)
cometapi tokens
# Search by keyword
cometapi tokens --search raycast
# JSON output
cometapi tokens --json
| Option | Short | Description |
|---|
--search | -s | Zoektrefwoord |
--page | -p | Paginanummer |
--page-size | | Resultaten per pagina |
--format | -f | Uitvoerformaat |
--json | | Uitvoer als JSON |
Logs
Gebruikslogs bekijken met filters. Vereist een access token.
# Recent logs
cometapi logs
# Filter by model
cometapi logs --model gpt-5.4
# Filter by date range
cometapi logs --start 2026-04-01 --end 2026-04-14
# Filter by log type
cometapi logs --type consume
# Export as CSV
cometapi logs --export > usage.csv
# JSON output with limit
cometapi logs --limit 50 --json
| Option | Short | Description |
|---|
--model | -m | Filteren op model ID |
--token-name | | Filteren op naam van API-sleutel |
--type | -t | Logtype: consume, topup, error, refund, system, manage |
--start | | Startdatum (YYYY-MM-DD) |
--end | | Einddatum (YYYY-MM-DD) |
--group | -g | Filteren op groep |
--limit | -l | Maximaal aantal items |
--page | -p | Paginanummer |
--page-size | | Resultaten per pagina |
--export | | Uitvoer als CSV naar stdout |
--format | -f | Uitvoerformaat |
--json | | Uitvoer als JSON |
Tasks
Async taaklogs weergeven voor platforms zoals Midjourney, Luma en Kling. Vereist een access token.
# Recent tasks
cometapi tasks
# Filter by platform
cometapi tasks --platform kling
# Filter by status
cometapi tasks --status SUCCESS
# JSON output
cometapi tasks --json
| Option | Short | Description |
|---|
--platform | | Filteren op platformnaam |
--status | | Filteren op status |
--limit | -l | Maximaal aantal items |
--format | -f | Uitvoerformaat |
--json | | Uitvoer als JSON |
Doctor
Diagnostiek uitvoeren om CLI-configuratie en API-connectiviteit te verifiëren.
cometapi doctor
cometapi doctor --json
De doctor controleert:
- Bestaan en leesbaarheid van het configuratiebestand
- Beschikbaarheid en bron van API-sleutel (config, env of ontbrekend)
- Beschikbaarheid van access token
- Netwerkconnectiviteit met het CometAPI-endpoint
- Geldigheid van API-authenticatie
| Option | Short | Description |
|---|
--format | -f | Uitvoerformaat |
--json | | Uitvoer als JSON |
Config
CLI-configuratie beheren die is opgeslagen in ~/.config/cometapi/config.toml.
# Show current config
cometapi config show
# Set a value
cometapi config set api_key sk-...
cometapi config set default_model claude-sonnet-4-6
cometapi config set output_format json
# Remove a value
cometapi config unset api_key
# Show config file path
cometapi config path
Zie de configuratiegids voor alle beschikbare sleutels.
Init
Voer de interactieve configuratiewizard uit om je API-sleutel en access token te configureren.
De wizard schrijft instellingen naar ~/.config/cometapi/config.toml.
Repl
Start een volledige interactieve opdrachtshell waarin je elke CLI-opdracht kunt uitvoeren zonder het voorvoegsel cometapi.
Alle data-opdrachten ondersteunen --json of --format:
cometapi models --json
cometapi models --format yaml
cometapi stats --format csv
cometapi account --format markdown
| Format | Description |
|---|
table | Uitgebreide tabel in de terminal (standaard) |
json | JSON-uitvoer |
yaml | YAML-uitvoer |
csv | Komma-gescheiden waarden |
markdown | Markdown-tabel |
Stel een standaardformaat voor alle opdrachten in via config:
cometapi config set output_format json
Shell completion
Installeer shell completion voor ondersteuning van tab-aanvullen:
cometapi --install-completion
Ondersteunde shells: Bash, Zsh, Fish.
Exit codes
| Code | Meaning |
|---|
0 | Succes |
1 | Algemene fout |
2 | Ongeldige argumenten |
64 | Configuratie ontbreekt |
69 | Service niet beschikbaar |
77 | Authenticatiefout |