How to list available models from the API
Get the current list of enabled model IDs programmatically.
Call the models endpoint
The models endpoint returns every enabled model ID. Use it to fill a model picker or validate IDs before sending requests.
Example
curl https://tokenrex.ai/api/public/v1/models -H "Authorization: Bearer YOUR_TOKENREX_KEY"Questions
- Do I need a separate key for each provider?
- No. One TokenRex API key works for every enabled model; change only the model ID.
Related
- How to use the OpenAI SDK with a custom base URL
- How to call Claude with the OpenAI SDK
- How to call Gemini with the OpenAI SDK
- How to use the Anthropic Messages API on TokenRex
- How to stream LLM responses
- How to use function calling (tools) with an LLM API
- How to send images to a vision model
- How to generate images with an API