Models API

List available models and get details for specific ones.

List Models

GET
/api/v1/models

Returns a paginated list of available models. Supports filtering by category, provider, and featured status.

Query Parameters

ParameterTypeDescription
categorystring"text", "image", "embedding", "video", "audio"
providerstring"openai", "anthropic", "google", "meta", etc.
featuredbooleanOnly return featured models.
limitnumberMax results to return.Default: 50
offsetnumberPagination offset.Default: 0

Example

bash
curl "https://railwail.com/api/v1/models?category=image&limit=10" \
  -H "Authorization: Bearer rw_live_xxxxx"

Response

JSON
{
  "object": "list",
  "data": [
    {
      "id": "model_abc123",
      "object": "model",
      "name": "Flux Schnell",
      "description": "Fast image generation model",
      "category": "image",
      "owned_by": "black-forest-labs",
      "pricing": {
        "credit_cost_fixed": 5,
        "credit_cost_input_per_1k": 0,
        "credit_cost_output_per_1k": 0,
        "currency": "credits"
      }
    }
  ],
  "has_more": true,
  "total": 45
}

Get Model

GET
/api/v1/models/:slug

Get full details for a specific model, including pricing, capabilities, and metadata.

Example

bash
curl "https://railwail.com/api/v1/models/flux-schnell" \
  -H "Authorization: Bearer rw_live_xxxxx"

Response

JSON
{
  "id": "model_abc123",
  "object": "model",
  "created": 1700000000,
  "name": "Flux Schnell",
  "description": "Fast, high-quality image generation by Black Forest Labs",
  "category": "image",
  "owned_by": "black-forest-labs",
  "provider_model_id": "black-forest-labs/flux-schnell",
  "image": "https://cdn.railwail.com/models/flux-schnell.jpg",
  "pricing": {
    "credit_cost_fixed": 5,
    "credit_cost_input_per_1k": 0,
    "credit_cost_output_per_1k": 0,
    "currency": "credits"
  },
  "capabilities": {},
  "metadata": {}
}