Capability · Workflows
Workflows API one call, one preset
In one sentence
Photta’s workflows API runs ready-made scene templates against your product images. Fetch the catalogue, fill the workflow’s image slots and options, POST, then poll each returned item until it completes.
- Typical time: 20–60 sec / image
- Credits: 4 credits at 2K · 5 credits at 4K
- Processing: async, polling
- Limits: 600 requests/min
- Authentication: Bearer key
Every figure on this page comes from the Photta API docs · checked
RESPONSE=$(curl -s -X POST https://api.photta.app/api/v1/workflows/jewelry-studio-shot \
-H "Authorization: Bearer $PHOTTA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"images": {
"jewelry": [
"https://cdn.yourstore.com/products/gold-ring.jpg"
]
},
"options": {
"jewelryLighting": "dramatic",
"backdrop": "dark"
},
"user_text": "hero shot, ring angled slightly toward the camera",
"num_images": 2,
"aspect_ratio": "3:4",
"resolution": "2K"
}')
ID=$(echo "$RESPONSE" | jq -r '.data.id')const res = await fetch("https://api.photta.app/api/v1/workflows/jewelry-studio-shot", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.PHOTTA_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"images": {
"jewelry": [
"https://cdn.yourstore.com/products/gold-ring.jpg"
]
},
"options": {
"jewelryLighting": "dramatic",
"backdrop": "dark"
},
"user_text": "hero shot, ring angled slightly toward the camera",
"num_images": 2,
"aspect_ratio": "3:4",
"resolution": "2K"
}),
});
const { data } = await res.json(); // data.id, data.statusimport os, requests
res = requests.post(
"https://api.photta.app/api/v1/workflows/jewelry-studio-shot",
headers={"Authorization": f"Bearer {os.environ['PHOTTA_API_KEY']}"},
json={
"images": {
"jewelry": [
"https://cdn.yourstore.com/products/gold-ring.jpg"
]
},
"options": {
"jewelryLighting": "dramatic",
"backdrop": "dark"
},
"user_text": "hero shot, ring angled slightly toward the camera",
"num_images": 2,
"aspect_ratio": "3:4",
"resolution": "2K"
},
)
data = res.json()["data"] # data["id"], data["status"]At a glance
At a glance
- Endpoint
- POST /api/v1/workflows/{workflow_id}
- Authentication
- Bearer API key
- Processing
- Asynchronous — poll the status endpoint
- Typical time
- 20–60 sec / image
- Credits
- 4 credits at 2K · 5 credits at 4K
- Aspect ratios
- 3:4 · 1:1 · 4:3 · 2:3 · 3:2 · 4:5 · 5:4 · 9:16 · 16:9 · 21:9
- Input limits
- Up to 10 MB per image; JPEG, PNG, WebP
- Idempotent
- No
Request and response
Request
RESPONSE=$(curl -s -X POST https://api.photta.app/api/v1/workflows/jewelry-studio-shot \
-H "Authorization: Bearer $PHOTTA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"images": {
"jewelry": [
"https://cdn.yourstore.com/products/gold-ring.jpg"
]
},
"options": {
"jewelryLighting": "dramatic",
"backdrop": "dark"
},
"user_text": "hero shot, ring angled slightly toward the camera",
"num_images": 2,
"aspect_ratio": "3:4",
"resolution": "2K"
}')
ID=$(echo "$RESPONSE" | jq -r '.data.id')const res = await fetch("https://api.photta.app/api/v1/workflows/jewelry-studio-shot", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.PHOTTA_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"images": {
"jewelry": [
"https://cdn.yourstore.com/products/gold-ring.jpg"
]
},
"options": {
"jewelryLighting": "dramatic",
"backdrop": "dark"
},
"user_text": "hero shot, ring angled slightly toward the camera",
"num_images": 2,
"aspect_ratio": "3:4",
"resolution": "2K"
}),
});
const { data } = await res.json(); // data.id, data.statusimport os, requests
res = requests.post(
"https://api.photta.app/api/v1/workflows/jewelry-studio-shot",
headers={"Authorization": f"Bearer {os.environ['PHOTTA_API_KEY']}"},
json={
"images": {
"jewelry": [
"https://cdn.yourstore.com/products/gold-ring.jpg"
]
},
"options": {
"jewelryLighting": "dramatic",
"backdrop": "dark"
},
"user_text": "hero shot, ring angled slightly toward the camera",
"num_images": 2,
"aspect_ratio": "3:4",
"resolution": "2K"
},
)
data = res.json()["data"] # data["id"], data["status"]202 Accepted / Completed
{
"data": {
"items": [
{
"id": "wfl_1f7c03a9e5b2486dd90c4b17ae62f508",
"workflow_id": "jewelry-studio-shot",
"status": "processing",
"resolution": "2K",
"aspect_ratio": "3:4",
"credits_used": 4,
"created_at": "2026-08-03T10:20:00Z"
},
{
"id": "wfl_8b2d64f0a1c9573ee4082d6cb95a3f17",
"workflow_id": "jewelry-studio-shot",
"status": "processing",
"resolution": "2K",
"aspect_ratio": "3:4",
"credits_used": 4,
"created_at": "2026-08-03T10:20:00Z"
}
],
"workflow_id": "jewelry-studio-shot",
"workflow_version": 1,
"credits_used": 8
},
"request_id": "req_wfl002"
}{
"data": {
"id": "wfl_1f7c03a9e5b2486dd90c4b17ae62f508",
"workflow_id": "jewelry-studio-shot",
"status": "completed",
"output_url": "https://cdn.photta.app/generated/wfl_1f7c03a9e5b2486dd90c4b17ae62f508.jpg",
"thumbnail_url": "https://cdn.photta.app/generated/wfl_1f7c03a9e5b2486dd90c4b17ae62f508-thumb.jpg",
"resolution": "2K",
"aspect_ratio": "3:4",
"credits_used": 4,
"created_at": "2026-08-03T10:20:00Z",
"completed_at": "2026-08-03T10:20:41Z",
"error_code": null,
"error_message": null
},
"request_id": "req_wfl003"
}Request parameters
workflow_idType: stringRequired
The workflow to run — an id from GET /api/v1/workflows (e.g. "jewelry-studio-shot"). Unknown ids return 404.
imagesType: objectRequired
Map of image slot id → array of images (https URL or base64 data URI). Slot ids, required flags, and min/max image counts come from the workflow's image_slots in the catalog. Missing entirely, missing a required slot, using an unknown slot, or exceeding a slot's max_images returns 400.
optionsType: object
Map of option id → choice id, both from the workflow's options in the catalog. Omitted options use their default_choice. Unknown option ids or choice ids return 400, as does sending an option that a filled image slot replaces (see replaces_options).
user_textType: string
Free-text styling/framing request (e.g. "hero shot, slightly angled"). Max 500 characters — excess is silently truncated. It never overrides product fidelity: the product always stays true to your images.
num_imagesType: integer
Images per run, 1-4. Each image is generated independently through the production model pipeline. Credits scale per image. When the workflow's catalog entry has `fixed_output_count` (only `jewelry-catalog-set`), that count is used instead.
= 1
aspect_ratioType: string
Output aspect ratio. Defaults to the workflow's default_aspect_ratio from the catalog (3:4 for every current workflow).
= 3:4
Values:3:41:14:32:33:24:55:49:1616:921:9resolutionType: string
Output resolution.
= 2K
Values:2K4K
Errors
- 400
invalid_request_error - The request is malformed or contains invalid parameters.
- 401
authentication_error - The API key is missing, invalid, or expired.
- 402
insufficient_credits_error - Your account does not have enough credits.
- 404
not_found_error - The requested resource does not exist.
- 409
conflict_error - The request conflicts with current state — e.g. your concurrent-batch cap is reached.
- 429
rate_limit_error - Too many requests. Slow down and retry.Retry-After: 30
- 500
api_error - An internal server error occurred (500), or a check your request needs could not run right now (503, e.g. moderation_unavailable). Retry later with backoff.
Limits
- 600 requests per minute per account (Fixed window; the limit is the same on every plan)
- A 429 carries Retry-After: 30 seconds
- Up to 10 MB per image
- Formats: JPEG, PNG, WebP
- Concurrent batches per plan: Free 1 · Hobby 2 · Seller 3 · Brand 4 · Studio 6
- Polling only — the API sends no webhooks.
Fetch the catalogue, fill the slots, run
List the workflows, fill their declared slots, submit, poll each item, download.
Step 1
Generate an API key
Workflows use the same credentials and the same credit balance as every other Photta capability.
Step 2
List the workflow catalogue
GET `/api/v1/workflows` returns the 54 templates across 7 categories, each declaring its own image slots, option enums and default aspect ratio. Filter with `category` — an unknown category returns 400 rather than being ignored.
Step 3
POST the run
POST `/api/v1/workflows/:workflow_id` with `images` (slot id to images) and `options` (option id to choice id), both taken from the catalogue entry. `user_text` accepts a free-text styling request, and `num_images` runs 1 to 4 images in one call.
Step 4
Poll every item
The 202 response carries one item per requested image. GET `/api/v1/workflows/generations/:id` every 3 seconds for each id until `data.status` is `completed` or `failed`; typical completion is 20 to 60 seconds per image.
Step 5
Download and persist
Each completed item carries its own `output_url`. Items finish independently, so you can publish the first while the rest are still rendering.
The same endpoint in Node.js, Python and cURL
Node.js
Workflows API in Node.js
Call Photta's workflows API from a Node.js backend with native fetch. No SDK required: store your key, submit the job, poll for the result.
ReadPython
Workflows API in Python
Call Photta's workflows API in Python with the requests library. Thirty-line wrapper, async-friendly via httpx, works in Django, FastAPI and Celery.
ReadcURL
Workflows API with cURL
Call Photta's workflows API directly from the shell with cURL. Submit, poll, download — every snippet pairs with jq for scripted pipelines.
Read
Questions developers ask before running workflows
What is the workflows API?
A catalogue of ready-made scene templates you run against your own product photographs. Instead of assembling a prompt, you pick a workflow and fill the image slots and options it declares.
How much does a workflow run cost?
4 credits per image at 2K and 5 per image at 4K, multiplied by `num_images`. The catalogue carries the live price for each workflow — read it from there rather than assuming.
How do I find a workflow id?
GET `/api/v1/workflows`. Each entry carries its id, its category, its image slots and its options. Filter the list with `category`: `jewelry`, `product`, `shoe`, `cosmetics`, `food`, `bag` or `watch`.
What goes in images and options?
`images` maps a slot id from the catalogue entry to an array of images, as https URLs or base64 data URIs. `options` maps an option id to one of that option’s choice ids. Both shapes come from the catalogue, which is why the integration survives new workflows.
How many images can one run produce?
`num_images` accepts 1 to 4. Each image is generated independently and gets its own item id in the response, so one can fail without taking the others down.
How do I poll for the results?
Poll each item separately: GET `/api/v1/workflows/generations/:id` every 3 seconds. GET `/api/v1/workflows/generations/list` gives a paged view filtered by `workflow_id` or `status`.
Related capabilities
Capabilities
Virtual try-on API for apparel
REST API that places apparel on AI mannequins. Asynchronous, 1.5–4 minute generation, 5 credits at 2K, 6 at 4K. cURL, Node.js and Python examples.
See the endpointCapabilities
Jewelry try-on API for necklaces, rings, bracelets and earrings
Place necklaces, rings, bracelets and earrings on AI models via REST. 5 credits at 2K, close-up mannequins built-in, reflection-aware rendering from the Photta docs.
See the endpointBuild
Build an AI product photography service
A founder's playbook for reselling Photta's virtual try-on API as a white-label SaaS: tenant keys, batch fanout, per-credit billing, SLA reality.
See the endpointCompare
Photta vs Ayna — developer API or Shopify-first studio
Photta vs Ayna compared: three REST endpoints vs a Shopify-first studio + API. Both have strengths. Sourced from each site on 2026-04-19.
See the endpointQuickstart
First Photta image in under five minutes.
Sign up, generate an API key, run your first cURL call, poll until it completes, persist the result. Five steps, documented end-to-end.
See the endpointReference
Photta API errors
The full list of Photta API error types with their status codes, the shape of an error body, and which failures are worth retrying.
See the endpointReference
Photta API rate limits
The Photta API rate limit, its window, the Retry-After header, the polling interval and the per-plan concurrency caps, all read from the API documentation.
See the endpoint
Every figure on this page comes from the Photta API docs · checked
Try the API in five minutes
Generate a Photta API key, paste the cURL snippet above, and you'll have your first on-model image before the coffee finishes brewing.
- 20–60 sec / image
- 4 credits at 2K · 5 credits at 4K
- async, polling
- 600 requests/min
- Bearer key