Authentication
A Bearer token in the Authorization header. Create keys in Settings.
Authorization: Bearer YOUR_API_KEYImages, video, audio and 3D behind one API, paid from the same balance as the studio. Create a key in Settings. The CLI is coming soon.
Coming soonThe CLI and SDKs are coming soon. The REST API below works today.
Swap the model ID to switch between image, video and speech. The fields follow the model.
1# 1. Generate an image2curl -X POST https://femimg.com/api/v1/api/catalog/generations \3 -H "Authorization: Bearer $FEMIMG_API_KEY" \4 -H 'Content-Type: application/json' \5 -H "Idempotency-Key: $(uuidgen)" \6 -d '{7 "modelId": "luma/uni-v1/text-to-image",8 "inputs": {9 "prompt": "Neon city street after rain, cinematic night",10 "size": "16:9"11 }12}'13 14# 2. Poll with the generation id from step 1 until its status is succeeded15curl https://femimg.com/api/v1/api/catalog/generations/$ID \16 -H "Authorization: Bearer $FEMIMG_API_KEY"17 18# 3. Download the file19curl https://femimg.com/api/v1/api/catalog/generations/$ID/content \20 -H "Authorization: Bearer $FEMIMG_API_KEY" \21 -o result.jpeg
export FEMIMG_API_KEY="YOUR_API_KEY"POST /api/v1/api/catalog/generationsGET /api/v1/api/catalog/generations/ID/contentA command-line tool for scripts, CI and coding agents is on the way, with the same keys and the same balance as the API. Until it ships, every call on this page works with plain curl.
A Bearer token in the Authorization header. Create keys in Settings.
Authorization: Bearer YOUR_API_KEYStarting a render answers at once with status queued. Poll it until it has succeeded, failed or been refunded.
{ "status": "queued" }Ask for the exact price of your inputs without starting anything. Every amount is in euro cents.
POST /api/v1/api/catalog/quoteSend an Idempotency-Key header and a retried request never charges twice.
Idempotency-Key: render-042Each key has a per-minute request limit. Over it, you get a 429 error.
429 Too Many RequestsJSON errors with a code and a message. A render that fails is refunded to your balance automatically.
{ "status": "refunded" }Base URL https://femimg.com/api/v1
/api/catalog/meThe key's name, limit and your balance/api/catalog/modelsThe catalog of models with their prices/api/catalog/models/detail?id=MODEL_IDOne model with all of its fields/api/catalog/quoteThe exact price of a set of inputs/api/catalog/generationsStart a render with any model/api/catalog/generationsYour recent generations/api/catalog/generations/IDStatus, cost and result of one generation/api/catalog/generations/ID/contentDownload the finished file/api/catalog/generations/IDDelete a generationTop up €3 and ship today
The API and the studio share one balance. A render that fails is refunded.