Retrieve a Genjutsu task
curl --request GET \
--url https://gengen.farm/v1/contents/generations/tasks/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://gengen.farm/v1/contents/generations/tasks/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://gengen.farm/v1/contents/generations/tasks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "higgsfieldgenjutsu:12345678-1234-4234-8234-123456789abc",
"model": "higgsfield-genjutsu",
"status": "succeeded",
"outputs": {
"videos": [
"https://example.com/restyled.mp4"
],
"images": []
},
"usage": {
"priceRowId": "genjutsu-restyle-720p",
"resolution": "720p",
"mode": "restyle",
"inputVideoDurationSeconds": 4.2,
"processedDurationSeconds": 4.2,
"billableSeconds": 5
}
}Genjutsu
Retrieve a Genjutsu task
GET
/
contents
/
generations
/
tasks
/
{id}
Retrieve a Genjutsu task
curl --request GET \
--url https://gengen.farm/v1/contents/generations/tasks/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://gengen.farm/v1/contents/generations/tasks/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://gengen.farm/v1/contents/generations/tasks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "higgsfieldgenjutsu:12345678-1234-4234-8234-123456789abc",
"model": "higgsfield-genjutsu",
"status": "succeeded",
"outputs": {
"videos": [
"https://example.com/restyled.mp4"
],
"images": []
},
"usage": {
"priceRowId": "genjutsu-restyle-720p",
"resolution": "720p",
"mode": "restyle",
"inputVideoDurationSeconds": 4.2,
"processedDurationSeconds": 4.2,
"billableSeconds": 5
}
}Use the complete
higgsfieldgenjutsu: ID returned by creation and the API key that owns the task. Poll while queued or running. On succeeded, read outputs.videos; on failed or cancelled, stop polling. Results are stored by GENGEN and returned as signed HTTPS URLs. Retrieve again to renew a URL. Repeated retrieval does not create work or charge again.
Usage
On success,usage.inputVideoDurationSeconds gives the full source length. processedDurationSeconds is the portion processed, up to 30 seconds. billableSeconds rounds that portion up to a whole second. mode and the resolution tier string select the price row. Multiply billableSeconds by the per-second rate for priceRowId in the price catalog.Authorizations
Response
Current task state, including outputs and usage on success.