> ## Documentation Index
> Fetch the complete documentation index at: https://composio-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ImageRouter

> Generate images, videos, and text with ImageRouter, inspect credits, validate normal API keys, and discover models. Management-key endpoints are excluded.

![ImageRouter logo](https://mintcdn.com/composio-preview/tIuAovF9-7pXq2wA/images/toolkits/imagerouter.svg?fit=max\&auto=format\&n=tIuAovF9-7pXq2wA\&q=85\&s=6e61025eb91aa32dc879a12b185c22c1)

* **Category:** ai content generation
* **Auth:** API\_KEY
* **Composio-managed OAuth available?** N/A
* **Tools:** 8
* **Triggers:** 0
* **Slug:** `IMAGEROUTER`
* **Version:** 00000000\_00

## Tools

> [accordion] Create Chat Completion
>
> **Slug:** `IMAGEROUTER_CREATE_CHAT_COMPLETION`
>
> Create a non-streaming OpenAI-compatible chat completion with a paid text model. Call IMAGEROUTER\_LIST\_MODELS, IMAGEROUTER\_GET\_MODEL, and IMAGEROUTER\_GET\_CREDITS first to verify availability, context, supported parameters, pricing, and sufficient credits.
>
> #### Input Parameters
>
> **model** `string` *required*
>
> Exact text-output model ID from IMAGEROUTER\_LIST\_MODELS. Inspect its context, supported parameters, and pricing before this paid call.
>
> **tools** `array`
>
> OpenAI-compatible function tool definitions available to the model.
>
> **top\_p** `number`
>
> Nucleus-sampling probability mass from 0 to 1.
>
> **messages** `array` *required*
>
> OpenAI-compatible conversation messages in chronological order.
>
> **max\_tokens** `integer`
>
> Maximum number of completion tokens.
>
> **temperature** `number`
>
> Sampling temperature supported by the selected model.
>
> **tool\_choice** `string`
>
> OpenAI-compatible tool-selection policy as a keyword or policy object.
>
> **response\_format** `object`
>
> OpenAI-compatible response format configuration, including structured output.
>
> **reasoning\_effort** `string`
>
> Reasoning effort for selected models that support this parameter.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Create Response
>
> **Slug:** `IMAGEROUTER_CREATE_RESPONSE`
>
> Create a non-streaming OpenAI Responses API result from plain text or structured multimodal input with a selected ImageRouter text model. Call IMAGEROUTER\_LIST\_MODELS and IMAGEROUTER\_GET\_CREDITS first because all text models observed during probing were paid. Streaming and SSE are not supported.
>
> #### Input Parameters
>
> **text** `object`
>
> Text output and structured-format configuration.
>
> **input** `string` *required*
>
> Plain prompt text or OpenAI Responses input items. Structured items may include model-supported multimodal content such as input\_image parts.
>
> **model** `string` *required*
>
> Exact text-output model ID from IMAGEROUTER\_LIST\_MODELS. Inspect the model's capabilities and pricing first because this call may consume credits.
>
> **tools** `array`
>
> OpenAI Responses-compatible tool definitions passed to the selected model.
>
> **top\_p** `number`
>
> Nucleus-sampling probability mass, from 0 to 1.
>
> **reasoning** `object`
>
> Reasoning configuration supported by the selected model.
>
> **temperature** `number`
>
> Sampling temperature, when supported by the selected model.
>
> **tool\_choice** `string`
>
> OpenAI Responses-compatible tool-selection policy.
>
> **instructions** `string`
>
> Optional system-level guidance for the response.
>
> **max\_output\_tokens** `integer`
>
> Maximum number of output tokens to generate.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Edit Image
>
> **Slug:** `IMAGEROUTER_EDIT_IMAGE`
>
> Transform or inpaint one or more existing images supplied as URLs or data URIs. Call IMAGEROUTER\_LIST\_MODELS and inspect the selected model first to verify image and optional mask input support, accepted parameters, pricing, and funding requirements. Multipart file uploads are not supported.
>
> #### Input Parameters
>
> **size** `string`
>
> Model-supported WIDTHxHEIGHT value or auto. Omit to use its default.
>
> **masks** `array`
>
> Optional mask URLs or data URIs for a model that accepts mask input. Provide 1-16 JSON string values when used.
>
> **model** `string` *required*
>
> Exact model ID from IMAGEROUTER\_LIST\_MODELS whose architecture accepts image input. Inspect its capabilities and pricing before editing.
>
> **images** `array` *required*
>
> Source image URLs or data URIs. Provide 1-16 JSON string values; binary multipart files are not supported.
>
> **prompt** `string` *required*
>
> Describe the requested transformation or inpainting result.
>
> **quality** `string ("auto" | "low" | "medium" | "high")`
>
> Requested quality. Omit unless the selected model lists quality as a supported parameter.
>
> **output\_format** `string ("webp" | "jpeg" | "png")`
>
> Edited image file format.
>
> **response\_format** `string`
>
> Output transport. Only URL output is supported to keep results bounded.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Generate Image
>
> **Slug:** `IMAGEROUTER_GENERATE_IMAGE`
>
> Generate an image from a text prompt with a selected ImageRouter model. Call IMAGEROUTER\_LIST\_MODELS and inspect the selected model first because pricing, supported sizes and quality levels, and funding requirements vary. Results are returned as URLs; inline base64 output is not supported.
>
> #### Input Parameters
>
> **size** `string`
>
> Model-supported WIDTHxHEIGHT value or auto. Omit to use its default.
>
> **model** `string` *required*
>
> Exact image model ID from IMAGEROUTER\_LIST\_MODELS. Inspect the model's capabilities and pricing before generation because production calls may consume credits or require a funded account.
>
> **prompt** `string` *required*
>
> Text description of the image to generate.
>
> **quality** `string ("auto" | "low" | "medium" | "high")`
>
> Requested quality. Omit unless the selected model lists quality as a supported parameter.
>
> **output\_format** `string ("webp" | "jpeg" | "png")`
>
> Generated image file format.
>
> **response\_format** `string`
>
> Output transport. Only URL output is supported to keep results bounded.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Generate Video
>
> **Slug:** `IMAGEROUTER_GENERATE_VIDEO`
>
> Generate a video from text and optional URL or data-URI image inputs. Call IMAGEROUTER\_LIST\_MODELS and inspect the selected model first because pricing, accepted modalities, quality levels, sizes, and duration constraints vary. Results are returned as URLs; inline base64 output is not supported.
>
> #### Input Parameters
>
> **size** `string`
>
> Model-supported WIDTHxHEIGHT value or auto. Omit to use its default.
>
> **model** `string` *required*
>
> Exact video model ID from IMAGEROUTER\_LIST\_MODELS. Inspect the model's capabilities and pricing before generation because production calls may consume credits or require a funded account.
>
> **images** `array`
>
> Optional source image URLs or data URIs for image-to-video models. Multipart files are not supported.
>
> **prompt** `string` *required*
>
> Text description of the video to generate.
>
> **quality** `string ("auto" | "low" | "medium" | "high")`
>
> Requested quality. Omit unless the selected model lists quality as a supported parameter.
>
> **seconds** `integer`
>
> Requested duration in seconds. Omit for the provider's auto default; each model supports its own subset.
>
> **response\_format** `string`
>
> Output transport. Only URL output is supported to keep results bounded.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Credits
>
> **Slug:** `IMAGEROUTER_GET_CREDITS`
>
> Inspect remaining credits, cumulative usage, deposits, and optional per-key usage before making potentially paid generation calls.
>
> #### Input Parameters
>
> **by\_api\_key** `boolean`
>
> Include usage and spend metadata grouped by API key. Secret key values are not returned.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Model
>
> **Slug:** `IMAGEROUTER_GET_MODEL`
>
> Get current capabilities, accepted parameters, and pricing for one exact ImageRouter model ID before generation.
>
> #### Input Parameters
>
> **model\_id** `string` *required*
>
> Exact model ID returned by IMAGEROUTER\_LIST\_MODELS, such as openai/gpt-image-2.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Models
>
> **Slug:** `IMAGEROUTER_LIST_MODELS`
>
> Discover current ImageRouter model IDs, modalities, supported parameters, and pricing before generation. Filters may be combined. limit truncates results and cannot be continued; omit it for an exhaustive filtered list.
>
> #### Input Parameters
>
> **free** `boolean`
>
> Set true for zero-priced models or false for paid models. Zero price does not guarantee access from an unfunded account.
>
> **name** `string`
>
> Case-insensitive partial model name, ID, or alias filter.
>
> **sort** `string ("name" | "provider" | "price" | "date")`
>
> Sort by name or provider alphabetically, price ascending, or date newest first.
>
> **limit** `integer`
>
> Truncate the returned array to at most this many models. There is no next page or continuation token.
>
> **fields** `string`
>
> Comma-separated response fields to include, such as architecture,pricing,supported\_parameters,parameters,aliases. The model ID is always returned.
>
> **provider** `string`
>
> Case-insensitive partial provider filter.
>
> **input\_modality** `string ("image" | "mask" | "text" | "audio" | "video")`
>
> Return models accepting this input modality.
>
> **output\_modality** `string ("image" | "video" | "text")`
>
> Return models producing this modality.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not
