Edit a reference photo with the API
Upload your photo, then pass its asset ID in inputAssetIds with your editing instructions. Use the same paid API key for both requests.
AI photo generator — API and integration boundary
| Capability | Request or state | Production boundary |
|---|---|---|
| GET /models | id · version · creditCost.base | Authorization: Bearer … |
| POST /assets/uploads | image/jpeg · image/png · image/webp | Idempotency-Key |
| POST /jobs | mode · prompt · modelId · modelVersion · quotedCredits · inputAssetIds | Idempotency-Key |
| GET /jobs/{jobId} | jobId | Authorization: Bearer … |
| GET /jobs/{jobId}/outputs | jobId | Authorization: Bearer … |
Edit a product photo


Model
curl -fsS 'https://freeaigenerator.ai/api/v1/media/catalog' | jq '.items[] | select(.workflow == "image-edit") | {id, workflow, credits}'POST /jobs
api='https://freeaigenerator.ai/api/v1/developer'
curl -fsS -H "Authorization: Bearer ${FREEAIGENERATOR_API_KEY:?}" "$api/models" |
jq -e --arg id 'qwen-2-1-edit' --arg prompt 'Change the blue mug to red and keep the background.' --arg ref "${REFERENCE_ASSET_ID:?}" \
'.items[] | select(.id == $id and .status == "available") |
{mode, prompt: $prompt, modelId: .id, modelVersion: .version, quotedCredits: .creditCost.base, parameters: {}, inputAssetIds: [$ref]}'POST /assets/uploads → id → REFERENCE_ASSET_ID
Sign in to view your credit balance. A listed model can still be temporarily unavailable; examples do not establish other workflow availability.
Worked example
First try this example manually. For an integration, confirm that the documented endpoint accepts the same input and produces the output you need.
In my photo, change only the tabletop to pale oak. Keep the product, label and shadow.
Check your result
Zoom in on the lettering and the shadow where the product touches the table. Compare them with the original.
FAQ
What does the generation API cover?
Upload your photo, then pass its asset ID in inputAssetIds with your editing instructions. Use the same paid API key for both requests.
How are jobs, credits and events handled?
The service reserves the displayed cost once, settles successful outputs and releases failed-job reservations. Check the job status and refreshed balance for the actual result.
What can a guest do before signing up?
Try AI image generation with your own prompt, no sign-up needed. Sign in to choose other models and see their credit costs.