← All articles

Building with text and images through TheRouter

Use the model catalog to choose a route, then generate images with a synchronous request or an asynchronous job.

Β· TheRouter

A single application may need text for conversation and images for creative work. TheRouter provides a model catalog and API endpoints for both. Choose a model for each task and check the supported operations and pricing before sending requests.

Start with the model catalog

Browse models to compare providers, modalities and published prices. Model capabilities and available routes differ: an image-input model is not necessarily an image-generation or image-editing model. Verify the operation and parameters for your selected route.

Choose an image workflow

For compatible models, chat completions can return image output. If you use the Images API, add ?async=true to the generation request to receive a job instead of waiting for the image inline. Poll the returned polling_url until the job succeeds or reaches another terminal state.

The async media guide includes the request, job statuses, result retrieval and error handling. Image sizes, formats and editing support depend on the model and provider; consult the relevant model and endpoint documentation before going live.

Put it into production

Keep API keys on your server, handle failed or expired jobs, and save the resulting image before its retrieval URL expires. Review actual usage and pricing for your chosen model in the dashboard. For a first request, follow the quickstart.

Help & contact