Models
Retrieves a list of all available image and video models.
GET /v1/models
Open in browser: https://api.imagerouter.io/v1/models
This endpoint supports filtering, sorting, and pagination to help you find the models you need.
Query Parameters
Section titled “Query Parameters”| Parameter | Type | Description |
|---|---|---|
type | string | Filter models by type. Can be image or video. |
provider | string | Filter models by provider. (e.g., google, openai). Supports partial matching. |
free | boolean | Filter for free models. Use true to get only free models and false for paid models. |
name | string | Filter models by name (ID). Supports partial matching. |
sort | string | Sort the results. Options: name, provider, arena_score, price, date. |
limit | integer | Limit the number of models returned. |
Sorting Order
Section titled “Sorting Order”name: Alphabetical (A-Z).provider: Alphabetical (A-Z).arena_score: Descending (highest score first).price: Ascending (lowest price first).date: Descending (newest first).
Examples
Section titled “Examples”Get all image models from Google
curl "https://api.imagerouter.io/v1/models?type=image&provider=google"const url = 'https://api.imagerouter.io/v1/models?type=image&provider=google';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}import requests
url = "https://api.imagerouter.io/v1/models"params = { "type": "image", "provider": "google"}
response = requests.get(url, params=params)print(response.json())Get the top 5 models sorted by arena score
curl "https://api.imagerouter.io/v1/models?sort=arena_score&limit=5"const url = 'https://api.imagerouter.io/v1/models?sort=arena_score&limit=5';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}import requests
url = "https://api.imagerouter.io/v1/models"params = { "sort": "arena_score", "limit": 5}
response = requests.get(url, params=params)print(response.json())Get all free models
curl "https://api.imagerouter.io/v1/models?free=true"const url = 'https://api.imagerouter.io/v1/models?free=true';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}import requests
url = "https://api.imagerouter.io/v1/models"params = { "free": "true"}
response = requests.get(url, params=params)print(response.json())Get all models, sorted by release date
curl "https://api.imagerouter.io/v1/models?sort=date"const url = 'https://api.imagerouter.io/v1/models?sort=date';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}import requests
url = "https://api.imagerouter.io/v1/models"params = { "sort": "date"}
response = requests.get(url, params=params)print(response.json())Get a specific model
Section titled “Get a specific model”Retrieves a single model by its ID.
GET /v1/models/:modelId
Path Parameters
Section titled “Path Parameters”| Parameter | Type | Description |
|---|---|---|
modelId | string | The ID of the model. |
Example
Section titled “Example”Get the sd3-medium model
curl "https://api.imagerouter.io/v1/models/sd3-medium"const url = 'https://api.imagerouter.io/v1/models/sd3-medium';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}import requests
url = "https://api.imagerouter.io/v1/models/sd3-medium"
response = requests.get(url)print(response.json())If the model is not found, you will receive a 404 error:
{ "error": { "message": "The model 'model-that-does-not-exist' does not exist.", "type": "invalid_request_error", "param": "model", "code": "model_not_found" }}