Search Documentation
Search for a documentation page...
Images API
REST API endpoints for uploading and generating product images.
Uploading images
Image upload moved to the Media API. Use POST /api/v1/media to upload files (multipart/form-data, up to 10 files of 25 MB each under the file field) or to ingest remote image URLs as JSON. It returns catalogued media records with CDN URLs you can use anywhere a product, collection, or post expects an image.
Generate Image
Generates an image using AI from a text prompt. The image is uploaded to the store's CDN and returns the URL. Timeout: 30 seconds.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Text prompt (1-1000 characters) |
type | string | No | Image type: product, collection, or hero (default: product) |
name | string | No | Filename prefix (default: generated) |
The type parameter affects the generated image's aspect ratio and style:
| Type | Use Case |
|---|---|
product | Square product photos, clean backgrounds |
collection | Wide banner images for collection headers |
hero | Full-width hero images for landing pages |
Response
List Generations
Lists the store's image and video generations, newest first, across all products.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 40 | Generations per page (1-100) |
offset | number | 0 | Generations to skip |
source | string | — | Filter by origin: studio (the in-app Image Studio) or api (this endpoint) |
type | string | — | Filter by media type: image or video |
Response
Get Generation
Poll the status and result of a generation started with POST /api/v1/images/generate. Store-scoped — a store can only read its own generations.
Response
Status Values
| Status | Meaning |
|---|---|
pending | Queued, not started yet |
processing | Generation in progress |
completed | Finished — url holds the result |
failed | Failed — error explains why |
A 404 is returned when no generation with that id belongs to the store.