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/models

Query Parameters

ParameterTypeDescription
modalitystringFilter by modality: text, image, audio, video, embedding, classification, translation.
providerstringFilter 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/:id

Example

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 IDAliasProvider
openai/gpt-4ogpt-4oOpenAI
openai/gpt-4o-minigpt-4o-miniOpenAI
anthropic/claude-sonnet-4-20250514Anthropic
anthropic/claude-haiku-3.5Anthropic
google/gemini-2.0-flashGoogle
cf/llama-3.3-70bCloudflare Workers AI
mistral/mistral-large-latestMistral
groq/llama-3.3-70bGroq
together/meta-llama/Llama-3.3-70BTogether AI

Providers

Universal AI API aggregates models from the following providers:

ProviderPrefixModalitiesNotes
OpenAIopenai/Text, Image, Audio, EmbeddingFull API compatibility
Anthropicanthropic/Text, VisionClaude model family
Googlegoogle/Text, Image, VideoGemini model family
Mistralmistral/Text, Embedding, CodeEuropean AI lab
Cloudflarecf/Text, Image, Embedding, Translation, ClassificationRuns at the edge, lowest latency
xAIxai/Text, ImageGrok models
Groqgroq/TextUltra-fast inference
Together AItogether/Text, ImageOpen-source model hosting
Fireworksfireworks/Text, ImageHigh-throughput inference
DeepInfradeepinfra/TextBudget inference
Deepgramdeepgram/Audio (STT)Real-time transcription
ElevenLabselevenlabs/Audio (TTS)High-quality voice synthesis
Replicatereplicate/Image, Video, AudioCommunity model marketplace
Black Forest Labsflux-bfl/ImageFLUX 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);