Skip to main content

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.

Use cometapi -h or cometapi <command> -h to inspect the exact arguments and options for the installed version.

Commands overview

CommandDescriptionAuth
chat [MESSAGE]Send a chat message or start the chat REPLAPI key
modelsList and filter model catalog metadataAPI key
model info <id>Inspect one model’s public metadataAPI key
run [MODEL]Send one request through chat, responses, anthropic, or gemini formatsAPI key
balanceShow account or current API key balanceAPI key or access token
accountShow account profileAccess token
statsShow usage statisticsAccess token
tokensList and search API keysAccess token
logsBrowse usage logs with filtersAccess token
tasksShow async task logsAccess token
initRun the setup wizardNone
doctorRun diagnosticsAPI key
configManage local configurationNone
replStart an interactive command shellDepends on command used
Commands marked Access token require the COMETAPI_ACCESS_TOKEN environment variable or the access_token config key. See the configuration guide for details.

Chat

Send a single message or start the multi-turn chat REPL.
cometapi chat "Explain CometAPI in one sentence."
cometapi chat "Summarize this" --model your-model-id --system "Be concise."
cometapi chat "Hello" --no-stream
cometapi chat "Hello" --json
cometapi chat
OptionShortDescription
--model-mModel to use
--system-sSystem prompt
--temperature-tSampling temperature
--max-tokensMaximum response tokens
--stream/--no-streamEnable or disable streaming
--format-fOutput format
--jsonOutput as JSON

Models

List models from the public catalog by default. Catalog output includes model ID, provider, model type, features, endpoints, pricing, context length, and maximum completion tokens.
cometapi models
cometapi models --search gpt --limit 10
cometapi models --provider openai --type chat --limit 10
cometapi models --feature image --endpoint responses --json
cometapi models --refresh
cometapi models --source openai --search gpt
OptionShortDescription
--search-sFilter by ID, code, name, description, or provider
--providerFilter by provider name or code
--type, --modalityFilter by model type or modality
--feature, --capabilityFilter by feature or capability
--endpointFilter by endpoint name, method, or path
--limit-lMaximum number of results
--sourceUse catalog metadata or OpenAI-compatible openai listing
--refreshRefresh the one-hour catalog cache
--no-cacheBypass the catalog cache for this command
--format-fOutput format
--jsonOutput as JSON
The catalog cache is stored at ~/.cache/cometapi/models.json.

Model info

Inspect public metadata for one model. The command resolves the model through the public catalog, then loads detail metadata for the catalog code.
cometapi model info your-model-id
cometapi model info your-model-id --json
cometapi model info your-model-id --refresh
OptionShortDescription
--refreshRefresh the catalog cache before lookup
--no-cacheBypass the catalog cache for this command
--format-fOutput format
--jsonOutput raw model detail JSON
Table output includes provider, model type, features, endpoints, pricing, context length, maximum completion tokens, documentation URL, and overview.

Run

Send one request through a selected endpoint format. Use --input-file for a JSON body, repeated -i key=value values for overrides, and -p/--prompt for a prompt shortcut.
cometapi run your-model-id -p "Write one sentence about CometAPI."
cometapi run your-model-id --endpoint responses -p "Reply with OK only." -i max_output_tokens=32 --json
cometapi run your-model-id --endpoint anthropic -p "Reply with OK only." -i max_tokens=32
cometapi run your-model-id --endpoint gemini -p "Reply with OK only." -i generationConfig.maxOutputTokens=32
cometapi run your-model-id --endpoint responses --input-file body.json -i temperature=0.2 --json
OptionShortDescription
--endpoint-eEndpoint format: chat, responses, anthropic, or gemini
--input-fileJSON object request body
--input-iRequest input as key=value; repeat for multiple values
--prompt-pPrompt shortcut
--jsonOutput raw JSON response
Endpoint mapping:
EndpointRequest pathAuth
chatPOST /v1/chat/completionsBearer API key
responsesPOST /v1/responsesBearer API key
anthropicPOST /v1/messagesx-api-key API key and Anthropic version header
geminiGemini Generate Content model pathx-goog-api-key API key
Body merge order is --input-file, repeated -i key=value, prompt shortcut, then positional MODEL. Inline values parse JSON when possible. Dotted keys create nested objects.

Balance

Show your CometAPI account balance or current API key billing view.
cometapi balance
cometapi balance --source account
cometapi balance --source key
cometapi balance --json
OptionShortDescription
--source-sData source: account or key
--format-fOutput format
--jsonOutput as JSON

Account

Show your account profile. Requires an access token.
cometapi account
cometapi account --json

Stats

Show usage statistics. Requires an access token.
cometapi stats
cometapi stats --json

Tokens

List and search API keys. Requires an access token.
cometapi tokens
cometapi tokens --search project
cometapi tokens --json
OptionShortDescription
--search-sSearch keyword
--page-pPage number
--limit-lResults per page
--format-fOutput format
--jsonOutput as JSON

Logs

Browse usage logs with filters. Requires an access token.
cometapi logs
cometapi logs --model your-model-id
cometapi logs --start 2026-04-01 --end 2026-04-14
cometapi logs --type consume
cometapi logs --export > usage.csv
cometapi logs --limit 50 --json
OptionShortDescription
--model-mFilter by model ID
--token-name-tFilter by API key name
--typeLog type
--search-sSearch keyword
--startStart date
--endEnd date
--group-gFilter by API key group
--page-pPage number
--limit-lResults per page
--exportOutput server-side CSV to stdout
--format-fOutput format
--jsonOutput as JSON

Tasks

Show async task logs. Requires an access token.
cometapi tasks
cometapi tasks --platform kling
cometapi tasks --status SUCCESS
cometapi tasks --json
OptionShortDescription
--platform-pFilter by platform
--task-idFilter by task ID
--status-sFilter by status
--action-aFilter by action type
--startStart date
--endEnd date
--pagePage number
--limit-lResults per page
--format-fOutput format
--jsonOutput as JSON

Doctor

Run diagnostics to verify configuration and API connectivity.
cometapi doctor
cometapi doctor --json

Config

Manage CLI configuration stored in ~/.config/cometapi/config.toml.
cometapi config show
cometapi config set api_key "$COMETAPI_KEY"
cometapi config set default_model your-model-id
cometapi config unset api_key
cometapi config path
See the configuration guide for all available keys.

Init

Run the interactive setup wizard:
cometapi init

Repl

Start a full interactive command shell:
cometapi repl

Output formats

Most data commands support --json or --format:
cometapi models --json
cometapi models --format yaml
cometapi stats --format csv
cometapi account --format markdown
FormatDescription
tableRich table in the terminal
jsonJSON output
yamlYAML output
csvComma-separated values
markdownMarkdown table