Skip to main content

Usage guide

Setup, environment variables, and Python/JavaScript/Go usage examples.

CometAPILLM

Chat models from many providers through CometAPI’s single OpenAI-compatible API. Useful when you want to switch between GPT, Claude, Gemini and others with one key. Authenticates with COMETAPI_API_KEY from your environment, or an explicit api_key.

Fields

str
default:"UNSET"
Model name as listed by CometAPI, e.g. “gpt-4o-mini”. Defaults to ‘gpt-4o-mini’.
float
default:"UNSET"
Sampling randomness, 0.0 to 2.0; higher is more varied. Defaults to 0.7.
int | None
default:"UNSET"
Maximum number of tokens the model may generate in one response. Leave unset for no explicit limit. Defaults to None (not set).