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.
Befehlsübersicht
| Command | Description | Auth |
|---|
chat [MESSAGE] | Eine Nachricht senden oder interaktives REPL starten | API-Schlüssel |
models | Verfügbare Modelle auflisten und durchsuchen | API-Schlüssel |
balance | Kontostand anzeigen | API-Schlüssel (oder access token) |
account | Kontoprofil anzeigen | Access token |
stats | Nutzungsstatistiken anzeigen | Access token |
tokens | Ihre API-Schlüssel auflisten und durchsuchen | Access token |
logs | Nutzungsprotokolle mit Filtern durchsuchen | Access token |
tasks | Async-Task-Protokolle anzeigen | Access token |
init | Interaktiver Einrichtungsassistent | — |
doctor | Diagnose- und Zustandsprüfungen ausführen | API-Schlüssel |
config | CLI-Konfiguration verwalten | — |
repl | Interaktive Befehls-Shell starten | API-Schlüssel |
Befehle mit der Kennzeichnung Access token erfordern die Umgebungsvariable COMETAPI_ACCESS_TOKEN oder den Konfigurationsschlüssel access_token. Details finden Sie im Konfigurationsleitfaden.
Chat
Eine einzelne Nachricht senden oder das interaktive REPL für mehrere Dialogrunden starten.
# 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 | Zu verwendendes Modell (Standard: aus der Konfiguration) |
--system | -s | System-Prompt |
--temperature | -t | Sampling-Temperatur (0.0–2.0) |
--max-tokens | | Maximale Anzahl Tokens in der Antwort |
--stream/--no-stream | | Streaming aktivieren oder deaktivieren (Standard: stream) |
--format | -f | Ausgabeformat |
--json | | Als JSON ausgeben |
Models
Verfügbare Modelle mit optionaler Suche und Begrenzung auflisten.
# 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 | Modelle nach Schlüsselwort filtern |
--limit | -l | Maximale Anzahl Ergebnisse |
--format | -f | Ausgabeformat |
--json | | Als JSON ausgeben |
Balance
Ihren CometAPI-Kontostand anzeigen.
# 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 | Datenquelle: account (gesamtes Konto) oder key (aktueller API-Schlüssel). |
--format | -f | Ausgabeformat |
--json | | Als JSON ausgeben |
Account
Ihr Kontoprofil anzeigen. Erfordert einen access token.
cometapi account
cometapi account --json
| Option | Short | Description |
|---|
--format | -f | Ausgabeformat |
--json | | Als JSON ausgeben |
Stats
Nutzungsstatistiken für den aktuellen Monat anzeigen. Erfordert einen access token.
cometapi stats
cometapi stats --json
Die Ausgabe enthält: Anzahl der Anfragen, Nutzungsbetrag, Erfolgsquote und prognostizierte verbleibende Tage des Guthabens.
| Option | Short | Description |
|---|
--format | -f | Ausgabeformat |
--json | | Als JSON ausgeben |
Tokens
Ihre API-Schlüssel auflisten und durchsuchen. Erfordert einen 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 | Suchbegriff |
--page | -p | Seitennummer |
--page-size | | Ergebnisse pro Seite |
--format | -f | Ausgabeformat |
--json | | Als JSON ausgeben |
Logs
Nutzungsprotokolle mit Filtern durchsuchen. Erfordert einen 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 | Nach model ID filtern |
--token-name | | Nach API-Schlüsselnamen filtern |
--type | -t | Protokolltyp: consume, topup, error, refund, system, manage |
--start | | Startdatum (YYYY-MM-DD) |
--end | | Enddatum (YYYY-MM-DD) |
--group | -g | Nach Gruppe filtern |
--limit | -l | Maximale Anzahl Einträge |
--page | -p | Seitennummer |
--page-size | | Ergebnisse pro Seite |
--export | | Als CSV nach stdout ausgeben |
--format | -f | Ausgabeformat |
--json | | Als JSON ausgeben |
Tasks
Async-Task-Protokolle für Plattformen wie Midjourney, Luma und Kling anzeigen. Erfordert einen 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 | | Nach Plattformnamen filtern |
--status | | Nach Status filtern |
--limit | -l | Maximale Anzahl Einträge |
--format | -f | Ausgabeformat |
--json | | Als JSON ausgeben |
Doctor
Diagnosen ausführen, um die CLI-Konfiguration und die API-Konnektivität zu überprüfen.
cometapi doctor
cometapi doctor --json
Der doctor prüft:
- Vorhandensein und Lesbarkeit der Konfigurationsdatei
- Verfügbarkeit und Quelle des API-Schlüssels (config, env oder fehlend)
- Verfügbarkeit des access token
- Netzwerkkonnektivität zum CometAPI-Endpunkt
- Gültigkeit der API-Authentifizierung
| Option | Short | Description |
|---|
--format | -f | Ausgabeformat |
--json | | Als JSON ausgeben |
Config
Die CLI-Konfiguration verwalten, die in ~/.config/cometapi/config.toml gespeichert ist.
# 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
Im Konfigurationsleitfaden finden Sie alle verfügbaren Schlüssel.
Init
Den interaktiven Einrichtungsassistenten ausführen, um Ihren API-Schlüssel und access token zu konfigurieren.
Der Assistent schreibt die Einstellungen nach ~/.config/cometapi/config.toml.
Repl
Eine vollständige interaktive Befehls-Shell starten, in der Sie jeden CLI-Befehl ohne das Präfix cometapi ausführen können.
Alle Datenbefehle unterstützen --json oder --format:
cometapi models --json
cometapi models --format yaml
cometapi stats --format csv
cometapi account --format markdown
| Format | Description |
|---|
table | Erweiterte Tabelle im Terminal (Standard) |
json | JSON-Ausgabe |
yaml | YAML-Ausgabe |
csv | Kommagetrennte Werte |
markdown | Markdown-Tabelle |
Legen Sie über die Konfiguration ein Standardformat für alle Befehle fest:
cometapi config set output_format json
Shell completion
Shell completion für Unterstützung bei der Tab-Vervollständigung installieren:
cometapi --install-completion
Unterstützte Shells: Bash, Zsh, Fish.
Exit codes
| Code | Meaning |
|---|
0 | Erfolg |
1 | Allgemeiner Fehler |
2 | Ungültige Argumente |
64 | Konfiguration fehlt |
69 | Dienst nicht verfügbar |
77 | Authentifizierungsfehler |