Get a generation
curl --request GET \
--url https://myunite.ai/api/v1/create/generations/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://myunite.ai/api/v1/create/generations/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://myunite.ai/api/v1/create/generations/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"generation": {
"id": "<string>",
"status": "queued",
"mediaType": "image",
"model": {
"id": "<string>",
"name": "<string>"
},
"createdAt": "<string>",
"completedAt": "<string>",
"cost": {
"estimatedCredits": 123,
"chargedCredits": 123,
"refunded": true,
"refundedCredits": 123
},
"outputs": [
{
"url": "<string>",
"thumbnailUrl": "<string>",
"mimeType": "<string>",
"width": 123,
"height": 123,
"durationSeconds": 123,
"format": "<string>",
"ref": "<string>"
}
],
"error": {
"code": "content_rejected",
"message": "<string>"
},
"prompt": "<string>",
"videoEditId": "<string>",
"checks": {
"status": "running",
"code": "check_expired",
"frameSheetUrl": "<string>",
"speech": {
"transcript": "<string>",
"language": "<string>",
"guide": "uniform",
"coverage": 123,
"missing": [
"<string>"
],
"extra": [
"<string>"
],
"endsAtSeconds": 123,
"wordsPerSecond": 123,
"stretched": [
{
"word": "<string>",
"at": 123,
"seconds": 123,
"guide": 123
}
],
"swallowed": [
{
"word": "<string>",
"at": 123,
"seconds": 123,
"guide": 123
}
],
"music": true
},
"mouth": {
"windows": 0,
"weakWindows": 0,
"weakFraction": 123,
"p25": 123,
"still": true,
"lipDelayFramesMedian": 123,
"lateLipWords": 0
}
}
},
"pollAfterSeconds": 0
}{
"error": {
"code": "invalid_api_key",
"message": "<string>",
"requestId": "<string>",
"docUrl": "<string>",
"param": "<string>"
}
}{
"error": {
"code": "invalid_api_key",
"message": "<string>",
"requestId": "<string>",
"docUrl": "<string>",
"param": "<string>"
}
}{
"error": {
"code": "invalid_api_key",
"message": "<string>",
"requestId": "<string>",
"docUrl": "<string>",
"param": "<string>"
}
}{
"error": {
"code": "invalid_api_key",
"message": "<string>",
"requestId": "<string>",
"docUrl": "<string>",
"param": "<string>"
}
}{
"error": {
"code": "invalid_api_key",
"message": "<string>",
"requestId": "<string>",
"docUrl": "<string>",
"param": "<string>"
}
}{
"error": {
"code": "invalid_api_key",
"message": "<string>",
"requestId": "<string>",
"docUrl": "<string>",
"param": "<string>"
}
}Create
Get a generation
Reads one generation of the workspace, free: prompt, status, model, cost and, when completed, each file’s URL, thumbnail, size and duration. With waitSeconds (up to 40) it waits while it runs; pollAfterSeconds comes while it still does. A failure has an error code; a refund shows refunded true. A generation of another workspace is 404 not_found. The workspace must have generation enabled (public_create): otherwise 403 feature_not_enabled.
Requires the create:read scope.
GET
/
create
/
generations
/
{id}
Get a generation
curl --request GET \
--url https://myunite.ai/api/v1/create/generations/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://myunite.ai/api/v1/create/generations/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://myunite.ai/api/v1/create/generations/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"generation": {
"id": "<string>",
"status": "queued",
"mediaType": "image",
"model": {
"id": "<string>",
"name": "<string>"
},
"createdAt": "<string>",
"completedAt": "<string>",
"cost": {
"estimatedCredits": 123,
"chargedCredits": 123,
"refunded": true,
"refundedCredits": 123
},
"outputs": [
{
"url": "<string>",
"thumbnailUrl": "<string>",
"mimeType": "<string>",
"width": 123,
"height": 123,
"durationSeconds": 123,
"format": "<string>",
"ref": "<string>"
}
],
"error": {
"code": "content_rejected",
"message": "<string>"
},
"prompt": "<string>",
"videoEditId": "<string>",
"checks": {
"status": "running",
"code": "check_expired",
"frameSheetUrl": "<string>",
"speech": {
"transcript": "<string>",
"language": "<string>",
"guide": "uniform",
"coverage": 123,
"missing": [
"<string>"
],
"extra": [
"<string>"
],
"endsAtSeconds": 123,
"wordsPerSecond": 123,
"stretched": [
{
"word": "<string>",
"at": 123,
"seconds": 123,
"guide": 123
}
],
"swallowed": [
{
"word": "<string>",
"at": 123,
"seconds": 123,
"guide": 123
}
],
"music": true
},
"mouth": {
"windows": 0,
"weakWindows": 0,
"weakFraction": 123,
"p25": 123,
"still": true,
"lipDelayFramesMedian": 123,
"lateLipWords": 0
}
}
},
"pollAfterSeconds": 0
}{
"error": {
"code": "invalid_api_key",
"message": "<string>",
"requestId": "<string>",
"docUrl": "<string>",
"param": "<string>"
}
}{
"error": {
"code": "invalid_api_key",
"message": "<string>",
"requestId": "<string>",
"docUrl": "<string>",
"param": "<string>"
}
}{
"error": {
"code": "invalid_api_key",
"message": "<string>",
"requestId": "<string>",
"docUrl": "<string>",
"param": "<string>"
}
}{
"error": {
"code": "invalid_api_key",
"message": "<string>",
"requestId": "<string>",
"docUrl": "<string>",
"param": "<string>"
}
}{
"error": {
"code": "invalid_api_key",
"message": "<string>",
"requestId": "<string>",
"docUrl": "<string>",
"param": "<string>"
}
}{
"error": {
"code": "invalid_api_key",
"message": "<string>",
"requestId": "<string>",
"docUrl": "<string>",
"param": "<string>"
}
}Autorizações
Parâmetros de consulta
Esta página foi útil?