Media Models
Use GET /api/v1/media_models to discover which image, video, audio, and music generation models can be called through the public generation API. The response is generated from the active media model configuration and includes only API-ready modes.
Endpoint
GET /api/v1/media_models
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
media_type |
string | No | Filter by image, video, or audio. |
Example request
curl "https://img2vid.net/api/v1/media_models?media_type=image" \
-H "Authorization: Bearer $BUBLE_API_KEY"
Response shape
{
"data": [
{
"model": "google/nano-banana-pro",
"name": "Nano Banana Pro",
"media_type": "image",
"operations": [
{
"mode": "text_to_image",
"description": "Generate images from a prompt.",
"input": {
"required": ["prompt"],
"optional": []
},
"parameters": [
{
"name": "aspect_ratio",
"type": "string",
"default": "1:1",
"enum": ["1:1", "16:9"],
"required": false
}
]
}
]
}
]
}
Important fields
| Field | Description |
|---|---|
model |
Use this value as the model field when creating a generation. |
operations[].mode |
Use this value as the public mode field. |
operations[].input.required |
Minimum public fields needed for the mode. |
operations[].parameters |
Model-specific controls accepted at the request root. |
Why mode matters
A model may support multiple operations. For production requests, pass mode explicitly. If you omit it, Img2Vid can infer the mode only when the input shape matches exactly one configured mode.
SDK examples
SDK model discovery calls map to GET /api/v1/media_models. Use this response as the source of truth for model keys, public modes, required inputs, and accepted model-specific parameters.
The snippets below assume you have already initialized the SDK client as shown in the Quickstart and imported the required language SDK types.
JavaScript / TypeScript
const models = await buble.mediaModels.list({ media_type: 'video' });
Python
models = client.media_models.list(media_type="video")
Go
models, err := client.MediaModels.List(ctx, "video")
Rust
let models = client.media_models().list(Some("video")).await?;
Swift
let models = try await client.mediaModels.list(mediaType: "video")
Dart / Flutter
final models = await client.mediaModels.list(mediaType: 'video');
Elixir
{:ok, models} = Buble.MediaModels.list(client, media_type: "video")
Java
Envelope<List<MediaModel>> models = client.mediaModels().list("video");
.NET
var models = await client.MediaModels.ListAsync(mediaType: "video");
PHP
$models = $client->mediaModels()->list(mediaType: 'video');
Ruby
models = client.media_models.list(media_type: "video")