The RELIEF API
Everything the studio does goes through an HTTP API under /api. The same rules apply: free use, quotas, moderation.
API keys
Create a key on the API keys page. It starts with rlf_ and is shown only once: keep it in a vault. Send it in the Authorization: Bearer rlf_… header. A key has the rights and quotas of your account.
The path of a generation
- Upload the image (image start):
POST /api/fichiers, multipart form with thefichierfield. Response:id,nom,taille,type_mime,largeur,hauteur. - Create the task:
POST /api/tacheswith a JSON bodytypeandparametres. An unknown parameter is refused (code 1004) rather than ignored. Response: the task'sidandstatut. - Track the task:
GET /api/taches/<id>every few seconds. Thestatutgoes fromqueuedtorunning, then tosuccess,failedorcancelled;positiongives the place in the queue,progression,etapeandjournalfollow the computing,parametresholds the actual values, defaults included. On failure,erreuris{"code", "message"}. - Download: on success,
resultatlists each file by its identifier, andfichiersgives, for each identifier, itsnom, itstype_mime, itstailleand a signedurl, valid for 7 days.
Examples with curl
Text start: create the task.
curl -s https://relief.s33d.fr/api/taches \
-H "Authorization: Bearer $RELIEF_CLE" \
-H "Content-Type: application/json" \
-d '{"type": "text_to_model", "parametres": {"prompt": "a black cast-iron teapot with a bamboo handle", "topologie": "quads", "graine": 0}}'
Image start: upload the file, then create the task with its identifier.
curl -s https://relief.s33d.fr/api/fichiers \
-H "Authorization: Bearer $RELIEF_CLE" \
-F "fichier=@objet.png"
curl -s https://relief.s33d.fr/api/taches \
-H "Authorization: Bearer $RELIEF_CLE" \
-H "Content-Type: application/json" \
-d '{"type": "image_to_model", "parametres": {"image": "<id>", "amont": true}}'
Track the task until its final status.
curl -s https://relief.s33d.fr/api/taches/<id> \
-H "Authorization: Bearer $RELIEF_CLE"
Task types
The studio uses text_to_model, image_to_model and convert_model. The API also accepts multiview_to_model, rig_model and text_to_image. texture_model and decimate_model are not supported yet, nor are faces in convert_model or pbr set to false with a texture: they answer with code 2002, without creating a task or using up any quota. An unknown type also answers with code 2002.
Generation parameters
| Name | Values | Default | Role |
|---|---|---|---|
prompt | text, 1000 | none | Description of the object, 1,000 characters at most (text start). |
style | text | none | Free style, optional (text start). |
image | id | none | Identifier of the uploaded file (image start). |
resolution | 512, 1024 | 1024 | Resolution of the generated volume. |
topologie | triangles, quads, basse | triangles | Delivered mesh: regular triangles, quads, or a low poly version. |
faces | 100 … 2000000, null | null | Target face count; null lets the pipeline choose. |
texture | true, false | true | Texture of the model. |
pbr | true, false | true | Roughness and metalness on top of colour: always true with a texture; false is accepted only with texture set to false (otherwise code 2002). |
taille_texture | 1024, 2048 | 2048 | Side of the texture in pixels. |
graine | 0 … 2147483647 | 0 | Seed of the random draw. |
amont | true, false | true | Background removal, checks and cropping of the image before generation. |
rig | true, false | false | Humanoid skeleton, for characters. |
modele | id | none | Source task of a conversion (convert_model): identifier of one of your successful tasks. |
format | glb, obj, stl, 3mf, fbx, usdz | none | Output format of a conversion (convert_model). |
unite_mm | true, false | true (stl, 3mf) | Conversion to STL or 3MF: millimetres (true, the default) or metres (false, STL only). The other formats stay in metres: true is refused there. |
Steps
The etape field takes, in order: moderation, concept and images (text start), detourage, tri, generation, nettoyage, topologie, uv, texture, rig (if requested), exports, rendus, publication. Each journal entry carries etape, debut, fin, duree_s, parametres, resume and fichiers.
The result
On success, resultat contains: modele (PBR GLB), modele_brut (the generator's GLB before post-processing, or null: skipped above resolution 512 or on failure, with the reason in the cleanup log), apercu, tournant, rendus (gris, filaire, texture: four views each; uv), image_reference, candidats, mesures, versions and exports. A missing export is made on request by a convert_model task.
mesures: faces, sommets, part_quads, composantes, aretes_non_manifold, faces_degenerees, chevauchement_uv, iles_uv, etanche, boite_m.
Every GLB is marked as AI-generated: asset.generator is RELIEF (S33D) and asset.extras carries genere_par_ia, producteur, tache and date.
Error codes
An error answers with an HTTP status and a JSON body: code (table below), cle (stable name of the error, for example quota_jour), message, suggestion and request_id. Temporary refusals (codes 1007, 2000, 2030) carry the Retry-After header, in seconds.
| Code | Meaning |
|---|---|
2 | Sign-in required: site session or rlf_ API key. |
1000 | Server error. Try again in a moment. |
1001 | The task failed after two attempts. |
1002 | Unknown or revoked API key. |
1003 | The request is malformed. |
1004 | A parameter is invalid. |
1007 | Too many requests in a short time. |
2000 | The queue is full, or a task from your account is already running. |
2001 | Task not found. |
2002 | This task type is not supported. |
2003 | The file is empty. |
2004 | File type refused: PNG, JPEG or WebP only. |
2008 | Request refused by moderation (content policy). |
2018 | Model too complex for this operation. |
2030 | Daily quota reached: 10 3D generations and 20 conversions per account per day. |
2031 | Account storage full: 10 GB per account. |
4001 | Unknown endpoint. |
Limits
- 10 3D generations and 20 conversions per account per day.
- One running task at a time per account.
- Public queue capped at 200 waiting tasks; beyond that, code 2000 with the
Retry-Afterheader. - Images: PNG, JPEG or WebP, 20 MB at most, at least 256 px per side. GLB uploaded for a retexture: 24 MB at most.
- 10 GB per account. Uploaded images are deleted after 30 days; models stay as long as the account exists.
- Deleting a task erases its files.
Other routes
| Name | Role |
|---|---|
GET /api/sante | Service status and API version. |
GET /api/moi | Your account, today's remaining quota and the storage used. |
POST /api/fichiers | Upload of an image (or of a GLB for a retexture). |
GET /api/taches?avant=<iso>&n=20 | Your tasks, newest first, in pages of n (100 at most); the suivant field gives the avant value for the next page. |
POST /api/taches/<id>/annuler | Cancels a waiting or running task. |
POST /api/taches/<id>/publier | Publishes the task in the gallery, or removes it. |
DELETE /api/taches/<id> | Deletes the task and its files. |
GET /api/file | Queue status, without signing in: en_attente, en_cours, attente_estimee_s, and attente_mesuree, true when the estimate comes from the measured durations of the latest generations rather than from an assumed duration. |
GET /api/galerie?avant=<iso>&n=20 | The published models, without signing in, in pages of n like your tasks. |
GET, POST, DELETE /api/cles | Listing, creating and revoking your keys. |