Skip to content

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

  1. Upload the image (image start): POST /api/fichiers, multipart form with the fichier field. Response: id, nom, taille, type_mime, largeur, hauteur.
  2. Create the task: POST /api/taches with a JSON body type and parametres. An unknown parameter is refused (code 1004) rather than ignored. Response: the task's id and statut.
  3. Track the task: GET /api/taches/<id> every few seconds. The statut goes from queued to running, then to success, failed or cancelled; position gives the place in the queue, progression, etape and journal follow the computing, parametres holds the actual values, defaults included. On failure, erreur is {"code", "message"}.
  4. Download: on success, resultat lists each file by its identifier, and fichiers gives, for each identifier, its nom, its type_mime, its taille and a signed url, 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

NameValuesDefaultRole
prompttext, 1000noneDescription of the object, 1,000 characters at most (text start).
styletextnoneFree style, optional (text start).
imageidnoneIdentifier of the uploaded file (image start).
resolution512, 10241024Resolution of the generated volume.
topologietriangles, quads, bassetrianglesDelivered mesh: regular triangles, quads, or a low poly version.
faces100 … 2000000, nullnullTarget face count; null lets the pipeline choose.
texturetrue, falsetrueTexture of the model.
pbrtrue, falsetrueRoughness and metalness on top of colour: always true with a texture; false is accepted only with texture set to false (otherwise code 2002).
taille_texture1024, 20482048Side of the texture in pixels.
graine0 … 21474836470Seed of the random draw.
amonttrue, falsetrueBackground removal, checks and cropping of the image before generation.
rigtrue, falsefalseHumanoid skeleton, for characters.
modeleidnoneSource task of a conversion (convert_model): identifier of one of your successful tasks.
formatglb, obj, stl, 3mf, fbx, usdznoneOutput format of a conversion (convert_model).
unite_mmtrue, falsetrue (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.

CodeMeaning
2Sign-in required: site session or rlf_ API key.
1000Server error. Try again in a moment.
1001The task failed after two attempts.
1002Unknown or revoked API key.
1003The request is malformed.
1004A parameter is invalid.
1007Too many requests in a short time.
2000The queue is full, or a task from your account is already running.
2001Task not found.
2002This task type is not supported.
2003The file is empty.
2004File type refused: PNG, JPEG or WebP only.
2008Request refused by moderation (content policy).
2018Model too complex for this operation.
2030Daily quota reached: 10 3D generations and 20 conversions per account per day.
2031Account storage full: 10 GB per account.
4001Unknown 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-After header.
  • 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

NameRole
GET /api/santeService status and API version.
GET /api/moiYour account, today's remaining quota and the storage used.
POST /api/fichiersUpload of an image (or of a GLB for a retexture).
GET /api/taches?avant=<iso>&n=20Your 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>/annulerCancels a waiting or running task.
POST /api/taches/<id>/publierPublishes the task in the gallery, or removes it.
DELETE /api/taches/<id>Deletes the task and its files.
GET /api/fileQueue 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=20The published models, without signing in, in pages of n like your tasks.
GET, POST, DELETE /api/clesListing, creating and revoking your keys.