---
title: Generate Text to Image Job API
slug: image-generation
url: https://apyhub.com/mastera-ai/service/image-generation
provider: MasterA AI
tags: [image-generation, text-to-image, flux, sdxl, ai-art]
auth: api_key
---

# Generate Text to Image Job API

Generate images from text prompts with Flux.1-Schnell or SDXL-Turbo. Poll task status for progress, errors, and the finished output URL.

## Endpoints

| Method | Path | Description | Atoms |
| --- | --- | --- | --- |
| POST | `/v1/flux/generate` | What it does Starts a text-to-image generation request using Flux.1-Schnell. You send a prompt plus… | 120 |
| POST | `/v1/sdxl/generate` | What it does Starts an ultra-fast text-to-image generation request using SDXL-Turbo from a text pro… | 100 |
| GET | `/v1/tasks/:task_id` | What it does Polls the status of an image generation task by taskid and returns the task’s current… | 0 |

## About

## What it does
GPU Image Generation creates images from text prompts and returns a task you can poll for progress. Use it when you need fast, model-backed image generation without managing your own inference stack.

Send a `prompt` and, optionally, `seed`, `steps`, `width`, and `height` to the Flux.1-Schnell endpoint or the SDXL-Turbo endpoint. The Turbo variant also accepts `negative_prompt` so you can steer the output away from unwanted elements. Both generation endpoints respond with `status`, `message`, and `task_id`, which you use with `GET /tasks/:task_id` to check progress.

Polling `/tasks/:task_id` returns the current `status`, a human-readable `message`, the `task_id`, and, when the task is complete, an `output_url` for the generated file. If the task fails, the same status response includes `error`.

This service fits product features like prompt-based asset creation, concept mockups, social content generation, or internal design tooling where developers need an image job API with asynchronous results and reproducible seeds.

## Usage

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/mastera-ai/service/image-generation
