curl https://api.artificialstudio.ai/api/generations/507f1f77bcf86cd799439011 \
-H "Authorization: YOUR_API_KEY"
const response = await fetch(
'https://api.artificialstudio.ai/api/generations/507f1f77bcf86cd799439011',
{ headers: { 'Authorization': 'YOUR_API_KEY' } }
);
const generation = await response.json();
import requests
response = requests.get(
'https://api.artificialstudio.ai/api/generations/507f1f77bcf86cd799439011',
headers={'Authorization': 'YOUR_API_KEY'}
)
generation = response.json()
{
"id": "507f1f77bcf86cd799439011",
"status": "success",
"tool": "create-image",
"output": "https://files.artificialstudio.ai/generations/abc123.png",
"thumbnail": "https://files.artificialstudio.ai/thumbnails/abc123.jpg",
"error": null,
"type": "image",
"payload": {
"model": "nano-banana",
"prompt": "A serene mountain landscape"
},
"createdAt": "2024-01-15T10:30:00.000Z"
}
{
"message": "Invalid or missing API key"
}
{
"message": "Generation not found"
}
{
"message": "Too many API requests, please try again later"
}
API Reference
Get Generation
Check the status and retrieve the result of an AI generation, including the output URL.
GET
/
api
/
generations
/
{id}
curl https://api.artificialstudio.ai/api/generations/507f1f77bcf86cd799439011 \
-H "Authorization: YOUR_API_KEY"
const response = await fetch(
'https://api.artificialstudio.ai/api/generations/507f1f77bcf86cd799439011',
{ headers: { 'Authorization': 'YOUR_API_KEY' } }
);
const generation = await response.json();
import requests
response = requests.get(
'https://api.artificialstudio.ai/api/generations/507f1f77bcf86cd799439011',
headers={'Authorization': 'YOUR_API_KEY'}
)
generation = response.json()
{
"id": "507f1f77bcf86cd799439011",
"status": "success",
"tool": "create-image",
"output": "https://files.artificialstudio.ai/generations/abc123.png",
"thumbnail": "https://files.artificialstudio.ai/thumbnails/abc123.jpg",
"error": null,
"type": "image",
"payload": {
"model": "nano-banana",
"prompt": "A serene mountain landscape"
},
"createdAt": "2024-01-15T10:30:00.000Z"
}
{
"message": "Invalid or missing API key"
}
{
"message": "Generation not found"
}
{
"message": "Too many API requests, please try again later"
}
Get the current status and result of a generation.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Your API key |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The generation ID |
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Generation ID |
status | string | pending, processing, uploading, success, error |
tool | string | Tool used |
output | string | null | URL to generated media |
thumbnail | string | null | URL to thumbnail |
error | string | null | Error message if failed |
type | string | Media type: image, video, audio, text, object |
payload | object | Original request parameters |
createdAt | string | Creation timestamp |
Status Values
| Status | Description |
|---|---|
pending | Queued for processing |
processing | Generation in progress |
uploading | Uploading to storage |
success | Completed successfully |
error | Failed (see error field) |
curl https://api.artificialstudio.ai/api/generations/507f1f77bcf86cd799439011 \
-H "Authorization: YOUR_API_KEY"
const response = await fetch(
'https://api.artificialstudio.ai/api/generations/507f1f77bcf86cd799439011',
{ headers: { 'Authorization': 'YOUR_API_KEY' } }
);
const generation = await response.json();
import requests
response = requests.get(
'https://api.artificialstudio.ai/api/generations/507f1f77bcf86cd799439011',
headers={'Authorization': 'YOUR_API_KEY'}
)
generation = response.json()
{
"id": "507f1f77bcf86cd799439011",
"status": "success",
"tool": "create-image",
"output": "https://files.artificialstudio.ai/generations/abc123.png",
"thumbnail": "https://files.artificialstudio.ai/thumbnails/abc123.jpg",
"error": null,
"type": "image",
"payload": {
"model": "nano-banana",
"prompt": "A serene mountain landscape"
},
"createdAt": "2024-01-15T10:30:00.000Z"
}
{
"message": "Invalid or missing API key"
}
{
"message": "Generation not found"
}
{
"message": "Too many API requests, please try again later"
}
⌘I