ImageRouter

App · 9 actions

Generate images and videos, discover models and read ImageRouter credit usage.

Actions

ActionWhat it does
Browse model capabilitiesBrowse model capabilities.
Create a chat completionSend chat messages to a text model and return its reply.
Create a model responseSend a text prompt through the Responses API and return the model output.
Edit an imageApply an editing prompt to an uploaded image or a public image URL.
Generate a videoGenerate a video.
Generate an imageGenerate an image.
Get credit balance and usageGet credit balance and usage.
Get model capabilitiesGet model capabilities.
List modelsList models.

Browse model capabilities

Browse model capabilities.

Inputs

Limitlimitnumber
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

ModelmodeltextRequired
Text model to use.
MessagesmessageslistRequired
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

ModelmodeltextRequired
Text model to use.
InputinputtextRequired
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

ImageimagetextRequired
Upload an image or enter its public URL.
PromptprompttextRequired
Describe the changes to make.
ModelmodeltextRequired
Image model that accepts an image as input.
Output formatoutput_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

PromptprompttextRequired
Prompt.
ModelmodeltextRequired
Model.
Response formatresponse_formattext
Response format.One of: url, b64_json (B64 json), b64_ephemeral (B64 ephemeral).
Qualityqualitytext
Quality.One of: auto, low, medium, high.
Sizesizetext
Size.
Secondssecondsnumber
Duration in seconds. Leave blank to use the model default.From 1 to 60.
Image URLimage_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

PromptprompttextRequired
Prompt.
ModelmodeltextRequired
Model.
Response formatresponse_formattext
Response format.One of: url, b64_json (B64 json), b64_ephemeral (B64 ephemeral).
Qualityqualitytext
Quality.One of: auto, low, medium, high, very_low (Very low), xhigh, max.
Sizesizetext
Size.
Output formatoutput_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 keyby_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

ModelmodeltextRequired
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": {}
}

On this page