---
title: Generate Text to Image API
slug: generate-images
url: https://apyhub.com/dosvak/service/generate-images
provider: Dosvak LLC
categories: [Artificial Intelligence, Image Processing, Smart Generation]
tags: [image-generation, text-to-image, base64-images, ai-images, prompt-generation]
auth: api_key
---

# Generate Text to Image API

Generate one or more images from a text prompt. Returns base64 or normalized image results with size, model, and job metadata.

## Endpoints

| Method | Path | Description | Atoms |
| --- | --- | --- | --- |
| POST | `/generations` | What it does Generates one or more images from a text prompt and returns them in a JSON response. T… | 100 |
| POST | `/generate` | What it does Generates one or more images from a text prompt and returns a JSON object containing t… | 100 |
| GET | `` | What it does Returns the configured generation models as a JSON object containing a data array and… | 100 |

## About

## What it does
Image Generation creates one or more images from a text prompt and returns the result as base64 or a normalised image payload.

Send a `prompt` and optionally set `n` from 1 to 4, `lane` to `fast` or `quality`, `size` such as `1024x1024`, `tier` (`demo`, `registered`, or `paid`), `model`, and `private_by_default`. The API responds with image items that can include `index`, `width`, `height`, `asset_id`, `b64_json`, `mime_type`, `source_url`, and `revised_prompt`. The `/generate` endpoint also returns top-level fields like `n`, `size`, `model`, `prompt`, `job_id`, `status`, `created`, `mime_type`, `image_base64`, and `latency_seconds`.

Use Image Generation when you need programmatic visuals for product mockups, content workflows, automated asset creation, or internal tools that turn prompts into images. The returned base64 payload makes it easy to store, transmit, or post-process generated images without an extra download step.

If you need a version that returns normalized image assets instead of only inline base64, use `/generations`. Both endpoints accept the same prompt-driven request shape, so you can switch between response formats without changing how you build the request.

## Usage

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/dosvak/service/generate-images
