Overview

Base URL

All Generations API requests are made to:

https://api.modelstack.cc/v1/generations

Supported Formats

The Generations API uses a unified JSON format across all supported providers. Just set the model and generation type — we handle the provider translation.

Available Endpoints

MethodEndpointDescription
POST/v1/generationsCreate a new image or video generation
GET/v1/generationsList generations with pagination
GET/v1/generations/:idGet generation status and result
DELETE/v1/generations/:idDelete a completed or failed generation

Authentication

All requests require an API key passed via the Authorization header:

Authorization: Bearer your_api_key

API keys are created and managed from your dashboard.

Rate Limits

There is currently no enforced rate limit on the Generations API — don't build against a specific requests-per-minute figure. Your effective throughput is bounded by your account balance, since every generation is billed on creation.

Request Format

All requests use JSON. Set the Content-Type header:

Content-Type: application/json

Image/Video Generation

Generations are created asynchronously:

  1. POST /v1/generations — returns immediately with a generation ID
  2. Poll GET /v1/generations/:id — check until status is completed or failed
  3. DownloadoutputMediaUrls on the completed generation holds storage keys, not direct URLs; exchange each key for a signed download URL via GET /v1/media/presigned-url?key=... (expires after 1 hour)

SDK Support

The Generations API works with any HTTP client. See the API Reference for code examples.