Spaces:
No application file
No application file
File size: 809 Bytes
b4d8ed2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
const response = await fetch(
"https://api.magicflow.ai/workflow/d5fcc41f-4358-4389-ae01-a09cca1a2b74/job",
{
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Token rQR05YX61Y34driX8udVRiuvIW+T1zdEJ5sJiNn2kGxYC+B8tLZTt3sPXB0/DYmS"
},
body: JSON.stringify({
mock: false,
params: {
face_url: "...",
gender: "...",
}
})
}
);
#The response will contain a jobId.
#Then to fetch the results through the API call:
const response = await fetch(
"https://api.magicflow.ai/workflow/d5fcc41f-4358-4389-ae01-a09cca1a2b74/jobs/[job-id]/results",
{
headers: {
"Content-Type": "application/json",
"Authorization": "Token rQR05YX61Y34driX8udVRiuvIW+T1zdEJ5sJiNn2kGxYC+B8tLZTt3sPXB0/DYmS",
},
}
); |