---
title: "Generate image"
method: POST
path: "/images"
tags: ["images"]
---

# Generate image

`POST /images`

## Request

- Base URL: `https://www.socialfaktory.com/v1`
- URL: `https://www.socialfaktory.com/v1/images`
- Auth: HTTP bearer

Make one image from a prompt, spending credits already in the account at the price quote_image names. Each request makes one image with its own image_generation_id. A reference_asset_id guides it with a picture from the library. Poll get_image every 2 to 5 seconds until it succeeds or fails; a failed image gives its credits back.

## Headers

- `Idempotency-Key` string, required

## Request body

- object
  - `brand_id` string: The brand this call belongs to. Required unless the token is pinned to a brand.
  - `prompt` string, required
  - `aspect` '9:16' | '3:4' | '1:1' | '16:9'
  - `reference_asset_id` string

## Response `201`

Generate image

- object
  - `image_generation_id` string, required
  - `status` string, required
  - `credit_cost` integer, required

## Other responses

- `default`: The error envelope

---

[API](https://skmtc.dev/socialfaktory/apis/socialfaktory-api.md) · [All operations](https://skmtc.dev/socialfaktory/apis/socialfaktory-api/llms.txt) · [OpenAPI document](https://skmtc.dev/socialfaktory/apis/socialfaktory-api/revisions/aa1714ae1ba4?raw)
