ImageRouter
App · 9 actions
Generate images and videos, discover models and read ImageRouter credit usage.
Actions
| Action | What it does |
|---|---|
| Browse model capabilities | Browse model capabilities. |
| Create a chat completion | Send chat messages to a text model and return its reply. |
| Create a model response | Send a text prompt through the Responses API and return the model output. |
| Edit an image | Apply an editing prompt to an uploaded image or a public image URL. |
| Generate a video | Generate a video. |
| Generate an image | Generate an image. |
| Get credit balance and usage | Get credit balance and usage. |
| Get model capabilities | Get model capabilities. |
| List models | List models. |
Browse model capabilities
Browse model capabilities.
Inputs
- Limit
limitnumber - Limit.From 1 to 100.
Outputs
datalist- The response from ImageRouter.
Example output
{
"data": [
{
"architecture": {
"input_modalities": [
"example"
],
"output_modalities": [
"example"
]
},
"id": "example",
"parameters": {},
"pricing": {},
"provider": "example",
"supported_parameters": [
"example"
]
}
]
}Create a chat completion
Send chat messages to a text model and return its reply.
Inputs
- Model
modeltextRequired - Text model to use.
- Messages
messageslistRequired - Ordered chat messages with a role and text for each.
Outputs
dataobject- The response from ImageRouter.
Example output
{
"data": {
"choices": [
{
"finish_reason": "example",
"index": 1,
"message": {
"content": "example",
"role": "example"
}
}
],
"id": "example",
"model": "example",
"usage": {}
}
}Create a model response
Send a text prompt through the Responses API and return the model output.
Inputs
- Model
modeltextRequired - Text model to use.
- Input
inputtextRequired - Text prompt for the model.
Outputs
dataobject- The response from ImageRouter.
Example output
{
"data": {
"id": "example",
"model": "example",
"output": [
{}
],
"status": "example",
"usage": {}
}
}Edit an image
Apply an editing prompt to an uploaded image or a public image URL.
Inputs
- Image
imagetextRequired - Upload an image or enter its public URL.
- Prompt
prompttextRequired - Describe the changes to make.
- Model
modeltextRequired - Image model that accepts an image as input.
- Output format
output_formattext - Output image format.One of:
webp,jpeg,png.
Outputs
dataobject- The response from ImageRouter.
Example output
{
"data": {
"created": 1,
"data": [
{
"b64_json": "example",
"revised_prompt": "example",
"url": "example"
}
]
}
}Generate a video
Generate a video.
Inputs
- Prompt
prompttextRequired - Prompt.
- Model
modeltextRequired - Model.
- Response format
response_formattext - Response format.One of:
url,b64_json(B64 json),b64_ephemeral(B64 ephemeral). - Quality
qualitytext - Quality.One of:
auto,low,medium,high. - Size
sizetext - Size.
- Seconds
secondsnumber - Duration in seconds. Leave blank to use the model default.From 1 to 60.
- Image URL
image_urltext - Public image URL to animate, when supported by the model.
Outputs
dataobject- The response from ImageRouter.
Example output
{
"data": {
"created": 1,
"data": [
{
"b64_json": "example",
"revised_prompt": "example",
"url": "example"
}
]
}
}Generate an image
Generate an image.
Inputs
- Prompt
prompttextRequired - Prompt.
- Model
modeltextRequired - Model.
- Response format
response_formattext - Response format.One of:
url,b64_json(B64 json),b64_ephemeral(B64 ephemeral). - Quality
qualitytext - Quality.One of:
auto,low,medium,high,very_low(Very low),xhigh,max. - Size
sizetext - Size.
- Output format
output_formattext - Output image format.One of:
webp,jpeg,png.
Outputs
dataobject- The response from ImageRouter.
Example output
{
"data": {
"created": 1,
"data": [
{
"b64_json": "example",
"revised_prompt": "example",
"url": "example"
}
]
}
}Get credit balance and usage
Get credit balance and usage.
Inputs
- By API key
by_api_keytrue/false - Break down usage by API key.
Outputs
dataobject- The response from ImageRouter.
Example output
{
"data": {
"credit_usage": "example",
"remaining_credits": "example",
"total_deposits": "example",
"usage_by_api_key": [
{
"api_key_id": "example",
"api_key_name": "example",
"created_at": "example",
"credit_usage": "example",
"expires_at": "example",
"is_active": true,
"period_spend": "example",
"period_start": "example",
"spend_limit": "example",
"spend_limit_period": "example",
"total_requests": 1
}
]
}
}Get model capabilities
Get model capabilities.
Inputs
- Model
modeltextRequired - Model.
Outputs
dataobject- The response from ImageRouter.
Example output
{
"data": {
"architecture": {
"input_modalities": [
"example"
],
"output_modalities": [
"example"
]
},
"id": "example",
"parameters": {},
"pricing": {},
"provider": "example",
"supported_parameters": [
"example"
]
}
}List models
List models.
Inputs
None.
Outputs
dataobject- The response from ImageRouter.
Example output
{
"data": {}
}