Uploading references
Your own image, video or audio as model input: upload it to the reference library first, then pass the id in reference_ids of a launch.
Three ways
bash
curl -X POST https://api.synesta.ai/v1/references \
-H "Authorization: Bearer $SYNESTA_API_KEY" \
-F "[email protected]"bash
curl -X POST https://api.synesta.ai/v1/references \
-H "Authorization: Bearer $SYNESTA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/photo.jpg"}'bash
curl -X POST https://api.synesta.ai/v1/references \
-H "Authorization: Bearer $SYNESTA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"file_base64":"iVBORw0KGgo...","mime":"image/png","name":"photo.png"}'| Way | Accepts |
|---|---|
file (multipart) | image, video, audio |
url | image only; a public https link up to 2048 characters |
file_base64 + mime | image only: image/jpeg, image/png, image/webp, image/gif; up to 14 MB by default |
Video and audio are accepted as a file only. A file that is too large · 422 upload_too_large, the ceiling is in details.max_mb.
Response
201 and the reference:
json
{
"data": {
"id": 9182,
"type": "image",
"width": 1024,
"height": 1536,
"duration_seconds": null,
"url": "https://...",
"face_status": "pending"
}
}Faces on references
Some models do not take references with a recognisable person. After upload a reference is checked; face_status shows the state:
face_status | Meaning |
|---|---|
not_applicable | no check needed (for example, audio) |
pending | the check is running |
clear | no recognisable faces |
face_detected | a face is present: models that do not take faces refuse it |
A launch with a reference whose check is not finished · 422 reference_not_analyzed with retryable: true: retry in a minute. A reference with a face on such a model · 422 reference_not_allowed: use another file or model.
Using it
json
{ "type": "video", "model": "MODEL_ID", "prompt": "Slow pan", "reference_ids": [9182] }- How many references a model takes is in
capabilities.max_reference_images; whether one is required ·requires_reference_image. - Up to 50 ids per request, the model decides the rest.
- Someone else's or a deleted id · 404
not_foundwithdetails.param = "reference_ids".
Limits
- 20 uploads per minute per account by default.
- Up to 2 link downloads run at once per account, the rest wait.
- The reference library is shared with the site. Full · 422
reference_library_full, delete some references on the site. - A link that does not open or returns something else · 422
reference_fetch_failed.