Models
Browse and query the full catalog of available models and providers.
Overview
Universal AI API provides access to over 1,500 models across multiple providers and modalities. The models endpoint lets you discover available models, filter by capability, and retrieve detailed information about any model.
List Models
Retrieve the full list of available models.
GET https://api.universal-ai.dev/v1/modelsQuery Parameters
| Parameter | Type | Description |
|---|---|---|
modality | string | Filter by modality: text, image, audio, video, embedding, classification, translation. |
provider | string | Filter by provider: openai, anthropic, google, mistral, cf, groq, together, deepgram, elevenlabs, etc. |
Example Requests
List all models:
curl https://api.universal-ai.dev/v1/models \
-H "Authorization: Bearer YOUR_API_KEY"List text generation models:
curl "https://api.universal-ai.dev/v1/models?modality=text" \
-H "Authorization: Bearer YOUR_API_KEY"List models from a specific provider:
curl "https://api.universal-ai.dev/v1/models?provider=anthropic" \
-H "Authorization: Bearer YOUR_API_KEY"Combine filters:
curl "https://api.universal-ai.dev/v1/models?modality=text&provider=cf" \
-H "Authorization: Bearer YOUR_API_KEY"Response
{
"object": "list",
"data": [
{
"id": "gpt-4o",
"object": "model",
"created": 1700000000,
"owned_by": "openai",
"modality": "text",
"context_length": 128000
},
{
"id": "anthropic/claude-sonnet-4-20250514",
"object": "model",
"created": 1700000000,
"owned_by": "anthropic",
"modality": "text",
"context_length": 200000
},
{
"id": "cf/llama-3.3-70b",
"object": "model",
"created": 1700000000,
"owned_by": "cloudflare",
"modality": "text",
"context_length": 8192
}
]
}Get a Single Model
Retrieve details about a specific model by its ID.
GET https://api.universal-ai.dev/v1/models/:idExample
curl https://api.universal-ai.dev/v1/models/gpt-4o \
-H "Authorization: Bearer YOUR_API_KEY"Response
{
"id": "gpt-4o",
"object": "model",
"created": 1700000000,
"owned_by": "openai",
"modality": "text",
"context_length": 128000,
"pricing": {
"prompt": 2.50,
"completion": 10.00,
"unit": "per_million_tokens"
}
}Model ID Format
Model IDs follow the pattern provider/model-name. Some popular models also have shorthand aliases:
| Full ID | Alias | Provider |
|---|---|---|
openai/gpt-4o | gpt-4o | OpenAI |
openai/gpt-4o-mini | gpt-4o-mini | OpenAI |
anthropic/claude-sonnet-4-20250514 | — | Anthropic |
anthropic/claude-haiku-3.5 | — | Anthropic |
google/gemini-2.0-flash | — | |
cf/llama-3.3-70b | — | Cloudflare Workers AI |
mistral/mistral-large-latest | — | Mistral |
groq/llama-3.3-70b | — | Groq |
together/meta-llama/Llama-3.3-70B | — | Together AI |
Providers
Universal AI API aggregates models from the following providers:
| Provider | Prefix | Modalities | Notes |
|---|---|---|---|
| OpenAI | openai/ | Text, Image, Audio, Embedding | Full API compatibility |
| Anthropic | anthropic/ | Text, Vision | Claude model family |
google/ | Text, Image, Video | Gemini model family | |
| Mistral | mistral/ | Text, Embedding, Code | European AI lab |
| Cloudflare | cf/ | Text, Image, Embedding, Translation, Classification | Runs at the edge, lowest latency |
| xAI | xai/ | Text, Image | Grok models |
| Groq | groq/ | Text | Ultra-fast inference |
| Together AI | together/ | Text, Image | Open-source model hosting |
| Fireworks | fireworks/ | Text, Image | High-throughput inference |
| DeepInfra | deepinfra/ | Text | Budget inference |
| Deepgram | deepgram/ | Audio (STT) | Real-time transcription |
| ElevenLabs | elevenlabs/ | Audio (TTS) | High-quality voice synthesis |
| Replicate | replicate/ | Image, Video, Audio | Community model marketplace |
| Black Forest Labs | flux-bfl/ | Image | FLUX image generation |
SDK Examples
Python:
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://api.universal-ai.dev/v1"
)
# List all models
models = client.models.list()
for model in models:
print(f"{model.id} ({model.owned_by})")
# Get a specific model
model = client.models.retrieve("gpt-4o")
print(f"Context length: {model.context_length}")JavaScript / TypeScript:
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "YOUR_API_KEY",
baseURL: "https://api.universal-ai.dev/v1",
});
// List all models
const models = await client.models.list();
for (const model of models.data) {
console.log(`${model.id} (${model.owned_by})`);
}
// Get a specific model
const model = await client.models.retrieve("gpt-4o");
console.log(model);