Skip to main content
POST
Generate image with MAI Image 2.7

MAI Image 2.7 on BudgetPixel

More examples, prompts and pricing.

Authorizations

Authorization
string
header
required

API key as a bearer token: Authorization: Bearer bpx_live_xxx

Body

application/json
prompt
string
required

Text description of the image to generate, or of the edit to apply to the input images (up to 8000 characters). Write @handle to cast a character: a BudgetPixel AI influencer or one of your own (GET /v1/characters).

aspect_ratio
enum<string>
default:auto

Output aspect ratio. "auto" (default): an edit keeps the first input image's frame and comes back aligned with it, and text-to-image is 1:1. On an edit, a ratio other than the input's own re-composes the picture into that shape.

Available options:
auto,
1:1,
4:3,
3:4,
3:2,
2:3,
16:9,
9:16
background
enum<string>
default:opaque

Output background. "transparent" returns a cut-out with an alpha channel (PNG, or WebP when asked), made from a text prompt: with input images the model draws the subject anew rather than cutting out the input (it is not a background remover).

Available options:
opaque,
transparent
num_images
integer
default:1

Number of images to generate (each one is billed).

Required range: 1 <= x <= 4
output_format
enum<string>
default:png

Output image format.

Available options:
png,
jpeg,
webp
reference_images
string[]

Optional input images (up to 5) to edit or combine. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-image. Each input image bills 11 credits at 1K or 45 at 2K, per generated image; at 1K an input over 1 megapixel is scaled down to 1 megapixel first.

Maximum array length: 5
size
enum<string>
default:1K

Output size: 1K is about 1 MP (1024x1024, or 1360x768 at 16:9) and bills 50 credits per image; 2K is about 4 MP (2048x2048, or 2720x1536 at 16:9) and bills 190. Input images add 11 each at 1K and 45 each at 2K. An edit that keeps its input's frame comes back at about 1 MP (1K) or with a 2048 px long edge (2K: 2048x1152 at 16:9).

Available options:
1K,
2K

Response

Job accepted.

characters
object[]

The characters the prompt cast with @handle mentions. Absent when none.

id
string

Opaque job id — use it to poll status.

Example:

"img_a1b2c3d4e5f6"

message
string
model
string
status
enum<string>

Lifecycle state. succeeded/failed/timeout are terminal.

Available options:
pending,
starting,
processing,
completing,
succeeded,
failed,
timeout