Profil + Credit-Saldo + Abo + Metadaten des aktuellen API-Keys.
Response
{
"user": { "id": "user_…", "email": "…", "createdAt": "…" },
"credits": { "balance": 4750, "monthlyQuota": 5300, "usedThisMonth": 550 },
"subscription": { "planId": "pro", "status": "active", "currentPeriodEnd": "…" },
"apiKey": { "id": "…", "scopes": ["read","generate"], "rateLimit": { "perMinute": 60, "perDay": 5000 } }
}
cURL
curl -H "Authorization: Bearer sk_swp_xxx" https://swappr.fr/api/v1/me
JavaScript
const res = await fetch("https://swappr.fr/api/v1/me", {
headers: { Authorization: `Bearer ${SWAPPR_KEY}` },
});
const data = await res.json();
Python
import requests
r = requests.get("https://swappr.fr/api/v1/me",
headers={"Authorization": f"Bearer {SWAPPR_KEY}"})
print(r.json())
GET/api/v1/jobsscope: readListet aktive und kürzlich beendete Jobs. `?include=active,recent&limit=40`.
Response
{
"jobs": [{ "id": "…", "status": "processing", "workflow": "studio_image", "createdAt": "…" }],
"hasMore": false
}
cURL
curl -H "Authorization: Bearer sk_swp_xxx" "https://swappr.fr/api/v1/jobs?include=active,recent&limit=40"
JavaScript
await fetch("https://swappr.fr/api/v1/jobs?include=active,recent", { headers: { Authorization: `Bearer ${k}` }})
Python
requests.get("https://swappr.fr/api/v1/jobs?include=active,recent", headers={"Authorization": f"Bearer {k}"})
POST/api/v1/studio/image/generatescope: generateStartet eine Bildgenerierung. Gibt eine jobId zum Polling zurück. Modelle: gpt-image-2, nano-banana-2, seedream-5, wan-27-image, grok-imagine. Mit nsfw=true: Default seedream-5, 3 API-Guards (Plan, Dashboard-Consent, kompatibles Modell).
Request body
{
"prompt": "luxury café interior, golden hour, cinematic",
"modelId": "seedream-5",
"imageCount": 1,
"aspectRatio": "4:5",
"nsfw": false,
"referenceImageUrls": []
}
Response
{ "jobId": "…", "batchId": "…", "status": "queued", "creditsCharged": 10 }
cURL
curl -X POST https://swappr.fr/api/v1/studio/image/generate \
-H "Authorization: Bearer sk_swp_xxx" \
-H "Content-Type: application/json" \
-d '{"prompt":"café interior","modelId":"seedream-5","aspectRatio":"4:5"}'
JavaScript
const res = await fetch("https://swappr.fr/api/v1/studio/image/generate", {
method: "POST",
headers: { Authorization: `Bearer ${k}`, "Content-Type": "application/json" },
body: JSON.stringify({ prompt: "café interior", modelId: "seedream-5" }),
});
Python
requests.post("https://swappr.fr/api/v1/studio/image/generate",
headers={"Authorization": f"Bearer {k}", "Content-Type": "application/json"},
json={"prompt": "café interior", "modelId": "seedream-5"})
GET/api/v1/studio/modelsscope: readKatalog der Studio-Bild/Video-Modelle: Preise, Qualitäten, Ratios, NSFW-Support.
Response
{
"imageModels": [{ "id": "seedream-5", "label": "Seedream 5", "nsfwCapable": true }],
"videoModels": [{ "id": "kling-3", "label": "Kling", "durations": [5, 10] }]
}
cURL
curl -H "Authorization: Bearer sk_swp_xxx" https://swappr.fr/api/v1/studio/models
JavaScript
await fetch("https://swappr.fr/api/v1/studio/models", { headers: { Authorization: `Bearer ${k}` }})
Python
requests.get("https://swappr.fr/api/v1/studio/models", headers={"Authorization": f"Bearer {k}"})
POST/api/v1/studio/video/generatescope: generateStartet eine asynchrone Videogenerierung. Unterstützt Bild/Video-Referenzen, Audio je Modell, Ratios und Dauern.
Request body
{
"prompt": "cinematic rooftop reel",
"modelId": "kling-3",
"aspectRatio": "9:16",
"duration": 5,
"referenceImageUrls": ["https://…"],
"generateAudio": false
}
Response
{ "jobId": "…", "status": "queued", "creditsCharged": 120 }
cURL
curl -X POST https://swappr.fr/api/v1/studio/video/generate \
-H "Authorization: Bearer sk_swp_xxx" -H "Content-Type: application/json" \
-d '{"prompt":"rooftop reel","modelId":"kling-3","aspectRatio":"9:16","duration":5}'
JavaScript
await fetch("https://swappr.fr/api/v1/studio/video/generate", {
method: "POST",
headers: { Authorization: `Bearer ${k}`, "Content-Type": "application/json" },
body: JSON.stringify({ prompt: "rooftop reel", modelId: "kling-3", duration: 5 }),
});
Python
requests.post("https://swappr.fr/api/v1/studio/video/generate",
headers={"Authorization": f"Bearer {k}", "Content-Type": "application/json"},
json={"prompt": "rooftop reel", "modelId": "kling-3", "duration": 5})
POST/api/v1/studio/audio/ttsscope: generateSynchrone ElevenLabs-Sprachsynthese. Gibt ein Audio-Medium zurück und belastet Credits zum Studio-Son-Tarif.
Request body
{
"text": "Bienvenue sur Swappr.",
"voiceId": "VOICE_ID",
"modelId": "eleven_multilingual_v2",
"languageCode": "fr"
}
Response
{ "url": "https://…/audio.mp3", "mediaType": "audio", "creditsCharged": 4 }
cURL
curl -X POST https://swappr.fr/api/v1/studio/audio/tts \
-H "Authorization: Bearer sk_swp_xxx" -H "Content-Type: application/json" \
-d '{"text":"Bienvenue sur Swappr.","voiceId":"VOICE_ID"}'
JavaScript
await fetch("https://swappr.fr/api/v1/studio/audio/tts", {
method: "POST",
headers: { Authorization: `Bearer ${k}`, "Content-Type": "application/json" },
body: JSON.stringify({ text: "Bienvenue sur Swappr.", voiceId: "VOICE_ID" }),
});
Python
requests.post("https://swappr.fr/api/v1/studio/audio/tts",
headers={"Authorization": f"Bearer {k}", "Content-Type": "application/json"},
json={"text": "Bienvenue sur Swappr.", "voiceId": "VOICE_ID"})
POST/api/v1/studio/audio/dialoguescope: generateSynchroner ElevenLabs-Multi-Voice-Dialog, bis zu 10 Repliken.
Request body
{
"inputs": [
{ "text": "Salut !", "voiceId": "VOICE_A" },
{ "text": "On tourne maintenant ?", "voiceId": "VOICE_B" }
],
"languageCode": "fr"
}
Response
{ "url": "https://…/dialogue.mp3", "mediaType": "audio", "creditsCharged": 8 }
cURL
curl -X POST https://swappr.fr/api/v1/studio/audio/dialogue \
-H "Authorization: Bearer sk_swp_xxx" -H "Content-Type: application/json" \
-d '{"inputs":[{"text":"Salut !","voiceId":"VOICE_A"}]}'
JavaScript
await fetch("https://swappr.fr/api/v1/studio/audio/dialogue", {
method: "POST",
headers: { Authorization: `Bearer ${k}`, "Content-Type": "application/json" },
body: JSON.stringify({ inputs: [{ text: "Salut !", voiceId: "VOICE_A" }] }),
});
Python
requests.post("https://swappr.fr/api/v1/studio/audio/dialogue",
headers={"Authorization": f"Bearer {k}", "Content-Type": "application/json"},
json={"inputs": [{"text": "Salut !", "voiceId": "VOICE_A"}]})
GET/api/v1/jobs/{id}scope: readStatus + Outputs eines Jobs. Poll alle 3 s empfohlen.
Response
{
"id": "…", "status": "completed", "outputs": ["https://…"],
"creditsCharged": 10, "createdAt": "…", "updatedAt": "…"
}
cURL
curl -H "Authorization: Bearer sk_swp_xxx" https://swappr.fr/api/v1/jobs/JOB_ID
JavaScript
await fetch(`https://swappr.fr/api/v1/jobs/${jobId}`, { headers: { Authorization: `Bearer ${k}` }})
Python
requests.get(f"https://swappr.fr/api/v1/jobs/{job_id}", headers={"Authorization": f"Bearer {k}"})
POST/api/v1/uploadsscope: generateMultipart-Upload einer Bild-, Video- oder Audio-Referenz. Nutze danach `storagePath` oder `url` in den Generate-Endpoints.
Response
{ "url": "https://…", "storagePath": "api-uploads/user/…", "mimeType": "image/jpeg", "size": 123456 }
cURL
curl -X POST https://swappr.fr/api/v1/uploads \
-H "Authorization: Bearer sk_swp_xxx" \
-F "[email protected]"
JavaScript
const form = new FormData();
form.append("file", file);
await fetch("https://swappr.fr/api/v1/uploads", { method: "POST", headers: { Authorization: `Bearer ${k}` }, body: form });
Python
requests.post("https://swappr.fr/api/v1/uploads",
headers={"Authorization": f"Bearer {k}"},
files={"file": open("reference.jpg", "rb")})
GET/api/v1/nsfw/statusscope: readNSFW-Zugang: kompatibler Plan, unterschriebener Consent, Modus verfügbar.
Response
{ "eligible": true, "consentRequired": false, "planId": "pro", "surchargeMultiplier": 1.25 }
cURL
curl -H "Authorization: Bearer sk_swp_xxx" https://swappr.fr/api/v1/nsfw/status
JavaScript
await fetch("https://swappr.fr/api/v1/nsfw/status", { headers: { Authorization: `Bearer ${k}` }})
Python
requests.get("https://swappr.fr/api/v1/nsfw/status", headers={"Authorization": f"Bearer {k}"})
GET/api/v1/library/itemsscope: readPaginierte Liste der Bibliotheksmedien. `?kind=saved|temporary&limit=20&cursor=<iso>`.
Response
{
"items": [{ "id": "…", "url": "…", "mediaType": "image", "retention": "saved", "createdAt": "…", "jobId": "…" }],
"nextCursor": "2026-06-12T12:00:00Z",
"hasMore": true
}
cURL
curl -H "Authorization: Bearer sk_swp_xxx" "https://swappr.fr/api/v1/library/items?limit=20&kind=saved"
JavaScript
await fetch("https://swappr.fr/api/v1/library/items?limit=20", { headers: { Authorization: `Bearer ${k}` }})
Python
requests.get("https://swappr.fr/api/v1/library/items?limit=20", headers={"Authorization": f"Bearer {k}"})
POST/api/v1/library/items/{id}/savescope: generateDauerhaftes Speichern eines temporären Bibliotheksmediums.
Request body
{ "mediaType": "image", "modelId": "seedream-5" }
Response
{ "id": "…", "retention": "saved", "url": "https://…" }
cURL
curl -X POST https://swappr.fr/api/v1/library/items/ITEM_ID/save \
-H "Authorization: Bearer sk_swp_xxx" -H "Content-Type: application/json" -d '{}'
JavaScript
await fetch("https://swappr.fr/api/v1/library/items/ITEM_ID/save", { method: "POST", headers: { Authorization: `Bearer ${k}` }})
Python
requests.post("https://swappr.fr/api/v1/library/items/ITEM_ID/save", headers={"Authorization": f"Bearer {k}"})
GET/api/v1/modelsscope: readListe der vom User gespeicherten KI-Personas/Modelle, nutzbar als Identitätsreferenz.
Response
{ "models": [{ "id": "…", "name": "Maya", "imageUrl": "https://…", "createdAt": "…" }] }
cURL
curl -H "Authorization: Bearer sk_swp_xxx" https://swappr.fr/api/v1/models
JavaScript
await fetch("https://swappr.fr/api/v1/models", { headers: { Authorization: `Bearer ${k}` }})
Python
requests.get("https://swappr.fr/api/v1/models", headers={"Authorization": f"Bearer {k}"})
GET/api/v1/faceswap/pricingscope: readFace Swap HD- und Refine-Preise nach Motor, NSFW und Optionen.
Response
{ "refineCredits": { "safe": 18, "nsfw": 23 }, "matrix": { "gpt": { "2k": 18 } } }
cURL
curl -H "Authorization: Bearer sk_swp_xxx" https://swappr.fr/api/v1/faceswap/pricing
JavaScript
await fetch("https://swappr.fr/api/v1/faceswap/pricing", { headers: { Authorization: `Bearer ${k}` }})
Python
requests.get("https://swappr.fr/api/v1/faceswap/pricing", headers={"Authorization": f"Bearer {k}"})
POST/api/v1/faceswap/generatescope: generateAsynchroner HD Face Swap: Quelle + Ziel über öffentliche URL oder Upload-`storagePath`.
Request body
{
"baseImage": { "url": "https://example.com/scene.jpg" },
"identity": { "modelId": "persona-uuid" },
"engine": "gpt",
"quality": "2k",
"nsfw": false
}
Response
{ "jobId": "…", "status": "queued", "creditsCharged": 15 }
cURL
curl -X POST https://swappr.fr/api/v1/faceswap/generate \
-H "Authorization: Bearer sk_swp_xxx" -H "Content-Type: application/json" \
-d '{"baseImage":{"url":"https://example.com/scene.jpg"},"identity":{"modelId":"persona-uuid"},"engine":"gpt"}'
JavaScript
await fetch("https://swappr.fr/api/v1/faceswap/generate", {
method: "POST",
headers: { Authorization: `Bearer ${k}`, "Content-Type": "application/json" },
body: JSON.stringify({
baseImage: { url: "https://example.com/scene.jpg" },
identity: { modelId: "persona-uuid" },
engine: "gpt",
}),
});
Python
requests.post("https://swappr.fr/api/v1/faceswap/generate",
headers={"Authorization": f"Bearer {k}", "Content-Type": "application/json"},
json={
"baseImage": {"url": "https://example.com/scene.jpg"},
"identity": {"modelId": "persona-uuid"},
"engine": "gpt",
})
POST/api/v1/faceswap/refinescope: generateFeinarbeit/Realismus nach Face Swap. Nützlich nach einem validierten Swap für Licht, Haut und Blending.
Request body
{ "faceSwapResultImageUrl": "https://example.com/swap-result.jpg", "engine": "gpt", "nsfw": false }
Response
{ "jobId": "…", "status": "queued", "creditsCharged": 18 }
cURL
curl -X POST https://swappr.fr/api/v1/faceswap/refine \
-H "Authorization: Bearer sk_swp_xxx" -H "Content-Type: application/json" \
-d '{"faceSwapResultImageUrl":"https://example.com/swap-result.jpg"}'
JavaScript
await fetch("https://swappr.fr/api/v1/faceswap/refine", {
method: "POST",
headers: { Authorization: `Bearer ${k}`, "Content-Type": "application/json" },
body: JSON.stringify({ faceSwapResultImageUrl: "https://example.com/swap-result.jpg" }),
});
Python
requests.post("https://swappr.fr/api/v1/faceswap/refine",
headers={"Authorization": f"Bearer {k}", "Content-Type": "application/json"},
json={"faceSwapResultImageUrl": "https://example.com/swap-result.jpg"})
GET/api/v1/camera-roll/pricingscope: readCamera-Roll-Preise (safe-only) nach Motor, Auflösung und Fotoanzahl.
Response
{ "engines": ["gpt", "nano"], "qualities": ["1k", "2k", "4k"], "photoCounts": [4, 8, 12, 20] }
cURL
curl -H "Authorization: Bearer sk_swp_xxx" https://swappr.fr/api/v1/camera-roll/pricing
JavaScript
await fetch("https://swappr.fr/api/v1/camera-roll/pricing", { headers: { Authorization: `Bearer ${k}` }})
Python
requests.get("https://swappr.fr/api/v1/camera-roll/pricing", headers={"Authorization": f"Bearer {k}"})
GET/api/v1/camera-roll/scenesscope: readKatalog der iPhone-style Camera-Roll-Szenen, filterbar nach Vibe/Kategorie.
Response
{ "scenes": [{ "id": "parking-selfie", "title": "Parking selfie", "category": "lifestyle" }] }
cURL
curl -H "Authorization: Bearer sk_swp_xxx" https://swappr.fr/api/v1/camera-roll/scenes
JavaScript
await fetch("https://swappr.fr/api/v1/camera-roll/scenes", { headers: { Authorization: `Bearer ${k}` }})
Python
requests.get("https://swappr.fr/api/v1/camera-roll/scenes", headers={"Authorization": f"Bearer {k}"})
POST/api/v1/camera-roll/generatescope: generateErzeugt eine kohärente Camera-Roll-Galerie aus einer Identität oder Referenz. `subjectGender` akzeptiert `feminine`, `masculine`, `neutral`, `auto`.
Request body
{
"referenceImage": { "url": "https://example.com/portrait.jpg" },
"sceneId": "car_passenger_bad_selfie",
"photoIndex": 0,
"totalPhotos": 4,
"engine": "gpt",
"quality": "2k",
"subjectGender": "feminine"
}
Response
{ "jobId": "…", "batchParentId": "…", "status": "queued", "creditsCharged": 18 }
cURL
curl -X POST https://swappr.fr/api/v1/camera-roll/generate \
-H "Authorization: Bearer sk_swp_xxx" -H "Content-Type: application/json" \
-d '{"referenceImage":{"url":"https://example.com/portrait.jpg"},"sceneId":"car_passenger_bad_selfie","photoIndex":0,"totalPhotos":4,"subjectGender":"feminine"}'
JavaScript
await fetch("https://swappr.fr/api/v1/camera-roll/generate", {
method: "POST",
headers: { Authorization: `Bearer ${k}`, "Content-Type": "application/json" },
body: JSON.stringify({
referenceImage: { url: "https://example.com/portrait.jpg" },
sceneId: "car_passenger_bad_selfie",
photoIndex: 0,
totalPhotos: 4,
subjectGender: "feminine",
}),
});
Python
requests.post("https://swappr.fr/api/v1/camera-roll/generate",
headers={"Authorization": f"Bearer {k}", "Content-Type": "application/json"},
json={
"referenceImage": {"url": "https://example.com/portrait.jpg"},
"sceneId": "car_passenger_bad_selfie",
"photoIndex": 0,
"totalPhotos": 4,
"subjectGender": "feminine",
})