List Models

Retrieve a list of all available AI models and their configurations.

GET
/api/v1/models

List all available models

Authentication

Requires API key authentication via Bearer token.

Query Parameters

NameTypeDescription
providerstringFilter by provider (e.g., 'google', 'fal.ai')
isActivebooleanFilter by active status (true/false)

Example Request

"text">-purple-600">curl https://vydra.app/api/v1/models \
  "text-blue-600">-H "Authorization: Bearer YOUR_API_KEY"

Response

200 OKjson
{
  "data": [
    {
      "slug": "gemini-image-generate",
      "name": "Gemini 2.0 Flash",
      "provider": "google",
      "modelId": "gemini-2.0-flash-exp-image-generation",
      "creditsPerUnit": 5,
      "pricingUnit": "image",
      "deployedOn": "vydra",
      "description": "Fast image generation from text prompts",
      "inputSchema": {
        "type": "object",
        "required": ["prompt"],
        "properties": {
          "prompt": { "type": "string" },
          "aspectRatio": { 
            "type": "string",
            "enum": ["1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9", "21:9"]
          }
        }
      },
      "exampleInput": {
        "prompt": "A futuristic city at sunset"
      },
      "isActive": true
    },
    {
      "slug": "nano-banana",
      "name": "Nano Banana (Gemini 2.5 Flash)",
      "provider": "google",
      "modelId": "gemini-2.5-flash-preview-native-image-generation",
      "creditsPerUnit": 8,
      "pricingUnit": "image",
      "deployedOn": "vydra",
      "description": "Higher quality generation and editing",
      "inputSchema": { ... },
      "isActive": true
    },
    {
      "slug": "flux-edit",
      "name": "Flux 2 Edit",
      "provider": "fal.ai",
      "modelId": "fal-ai/flux-2/edit",
      "creditsPerUnit": 15,
      "pricingUnit": "image",
      "deployedOn": "fal.ai",
      "description": "Multi-image composition and editing",
      "inputSchema": { ... },
      "isActive": true
    }
  ],
  "count": 3
}

Response Fields

Model Object

NameTypeDescription
slugstringUnique identifier for the model
namestringHuman-readable model name
providerstringModel provider (google, fal.ai, etc.)
modelIdstringProvider's model identifier
creditsPerUnitnumberCredits charged per generation
pricingUnitstringUnit of pricing (image, minute, etc.)
deployedOnstringWhere the model runs (vydra, fal.ai, etc.)
descriptionstringModel description
inputSchemaobjectJSON Schema for valid inputs
exampleInputobjectExample input for testing
isActivebooleanWhether the model is currently available

Filter Examples

Filter by Provider

"text">-purple-600">curl "https://vydra.app/api/v1/models?provider=google" \
  "text-blue-600">-H "Authorization: Bearer YOUR_API_KEY"

Filter Active Models Only

"text">-purple-600">curl "https://vydra.app/api/v1/models?isActive=true" \
  "text-blue-600">-H "Authorization: Bearer YOUR_API_KEY"