curl --request POST \
--url https://api.geekidea.ai/v1/dramas/{id}/media/{mediaId}/upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file_id": "file-0192f1c3a7b87c3e9a4f5b6c7d8e9f01"
}
'import requests
url = "https://api.geekidea.ai/v1/dramas/{id}/media/{mediaId}/upload"
payload = { "file_id": "file-0192f1c3a7b87c3e9a4f5b6c7d8e9f01" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({file_id: 'file-0192f1c3a7b87c3e9a4f5b6c7d8e9f01'})
};
fetch('https://api.geekidea.ai/v1/dramas/{id}/media/{mediaId}/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "dmedia_0192f1c3a7b87c3e9a4f5b6c7d8e9f01",
"object": "drama.media",
"episode_no": 1,
"category": "keyframe",
"element_code": "<string>",
"shot_no": 123,
"stale": true,
"current": {
"version": 1,
"status": "succeeded",
"source": "<string>",
"file": {
"file_id": "<string>",
"url": "<string>",
"mime": "<string>",
"width": 123,
"height": 123
},
"generation_id": "<string>",
"prompt": "<string>",
"feedback": "<string>",
"error_code": "<string>",
"created_at": 123
},
"latest": {
"version": 1,
"status": "succeeded",
"source": "<string>",
"file": {
"file_id": "<string>",
"url": "<string>",
"mime": "<string>",
"width": 123,
"height": 123
},
"generation_id": "<string>",
"prompt": "<string>",
"feedback": "<string>",
"error_code": "<string>",
"created_at": 123
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}Replace a media item with an upload
Replaces a reference image, keyframe or poster with an uploaded image (POST /v1/files), saved as a new current version at no charge; downstream media are marked stale.
curl --request POST \
--url https://api.geekidea.ai/v1/dramas/{id}/media/{mediaId}/upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file_id": "file-0192f1c3a7b87c3e9a4f5b6c7d8e9f01"
}
'import requests
url = "https://api.geekidea.ai/v1/dramas/{id}/media/{mediaId}/upload"
payload = { "file_id": "file-0192f1c3a7b87c3e9a4f5b6c7d8e9f01" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({file_id: 'file-0192f1c3a7b87c3e9a4f5b6c7d8e9f01'})
};
fetch('https://api.geekidea.ai/v1/dramas/{id}/media/{mediaId}/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "dmedia_0192f1c3a7b87c3e9a4f5b6c7d8e9f01",
"object": "drama.media",
"episode_no": 1,
"category": "keyframe",
"element_code": "<string>",
"shot_no": 123,
"stale": true,
"current": {
"version": 1,
"status": "succeeded",
"source": "<string>",
"file": {
"file_id": "<string>",
"url": "<string>",
"mime": "<string>",
"width": 123,
"height": 123
},
"generation_id": "<string>",
"prompt": "<string>",
"feedback": "<string>",
"error_code": "<string>",
"created_at": 123
},
"latest": {
"version": 1,
"status": "succeeded",
"source": "<string>",
"file": {
"file_id": "<string>",
"url": "<string>",
"mime": "<string>",
"width": 123,
"height": 123
},
"generation_id": "<string>",
"prompt": "<string>",
"feedback": "<string>",
"error_code": "<string>",
"created_at": 123
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}Authorizations
Provide your API key in the Authorization header using Bearer auth
Body
Request to replace a media item with an upload.
ID of the uploaded image file (POST /v1/files)
1"file-0192f1c3a7b87c3e9a4f5b6c7d8e9f01"
Response
OK
A media slot (character, turnaround, scene, prop, keyframe, clip, final, cover, poster) with its current version.
ID (dmedia_ prefix)
"dmedia_0192f1c3a7b87c3e9a4f5b6c7d8e9f01"
Object type
"drama.media"
Episode number
1
Category
character, turnaround, scene, prop, keyframe, clip, final, cover, poster "keyframe"
Code of the character, scene or prop
Segment number (keyframes and clips)
Upstream changed: a reference image, keyframe or clip it was made from has a new version; you can regenerate it
One version of a media item.
Show child attributes
Show child attributes
One version of a media item.
Show child attributes
Show child attributes
