API ReferenceView as MarkdownOpenAPI

Media

View as Markdown

Images, videos and files uploaded to the site, stored in cloud storage and referenced by ID from pages, products and everything else.

Endpoints that need a token: the site owner creates it in their admin (Developers > API reference). AI assistants: how to ask the user for one.

72 endpoints in 6 parts: Media, File Route, Qr Code, Video, Video Interaction, AI builder.

Endpoints
POST/add-media-qualityGET/check-video/:idPOST/create-storage-folderGET/download-media/:idGET/get-media-cdnPOST/get-media-upload-signed-urlPOST/get-storage-upload-signed-urlPOST/get-vimeo-formPOST/import-mediasPOST/import-medias-from-siteGET/logoGET/media-about-section-import/:idGET/media-instagramPOST/media-sequence-generateGET/media-sequence-generate/costGET/media-sequence/:idPOST/media-sequence/:idPOST/media-sequence/:id/client-failPOST/media-sequence/:id/client-finishPOST/media-sequence/:id/client-progressPOST/media-sequence/:id/client-startGET/media-tracker/:idPOST/mediasGET/medias-avatar/:idGET/medias-countGET/medias-form/:form_id&:img_indexGET/medias-large/:idGET/medias-marker/:idGET/medias-medium/:idGET/medias-object/:idGET/medias-og/:idGET/medias-responsive/:idGET/medias-storageGET/medias-thumbnail/:idGET/medias-xlarge/:idGET/medias/:idPATCH/medias/:idDELETE/medias/:idGET/pwa-logoGET/pwa-media/:idGET/qr-code-medias/:idPATCH/remove-media-qualityPATCH/storage-fileGET/storage-filesGET/file-routesPOST/file-routesPATCH/file-routes/:idDELETE/file-routes/:idGET/qr-codePOST/qr-codeGET/qr-code/:idPATCH/qr-code/:idGET/single-video/:idGET/videosPOST/videosDELETE/videos-multiple/:delete_idsPATCH/videos-multiple/:patch_idsGET/videos/:idPATCH/videos/:idDELETE/videos/:idGET/videos/playlistsPOST/video-interactionPOST/create-new-imagePOST/create-new-videoPOST/generate-imagePOST/generate-image-to-videoPOST/generate-text-to-videoPOST/generate-video-to-videoPOST/modify-ai-imagePOST/modify-ai-user-imagePOST/modify-user-imagePOST/update-image

Add an add media quality

Starts transcoding a video (media_id) to another quality (transcode). 404 "Not found.", 401 "Unauthorized." for a video the user does not own. Answers { url, media }.

User token

Needs the token of a signed-in user.

Parameters
media_idstring

The add media quality's media id.

transcodestring

The add media quality's transcode.

typestring

The add media quality's type.

Status codes

200 401 404 500

POST/add-media-quality
curl -X POST 'http://bulgariandebateassociation.max-media.io/add-media-quality?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "media_id": "...", "transcode": "...", "type": "..." }'
Response
{
  "file": "example",
  "file_path": "example",
  "alt": "example",
  "filename": "Example",
  "filetype": "example",
  "vimeo_uri": "example",
  "vimeo_picture": "example",
  "duration": 1,
  "vimeo_url": "example-item",
  "youtube_url": "example-item",
  "youtube_picture": "example",
  "thumbnail": "example",
  "gcs_url": "example-item",
  "gcs_480_30_url": "example-item",
  "gcs_720_30_url": "example-item",
  "gcs_1080_30_url": "example-item",
  "picture_gcs_url": "example-item",
  "transcode_status": "not_started",
  "owner_id": "6543210fedcba98765432100",
  "source_url": "example-item",
  "source_framing": "example",
  "origin": "example",
  "width": 1,
  "height": 1,
  "sequence": {
    "status": "example",
    "started_at": "example",
    "updated_at": "example",
    "step": "example",
    "done": 0,
    "total": 0,
    "ext": "example",
    "trim_start": 0,
    "trim_end": 0,
    "build_id": "example",
    "previous_base": "example",
    "frame_count": 0
  }
}

Check a video

Whether a Vimeo video has finished processing. Answers { duration } once Vimeo has processed the video.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the video.

Status codes

200 401 500

GET/check-video/:id
curl -X GET 'http://bulgariandebateassociation.max-media.io/check-video/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "file": "example",
  "file_path": "example",
  "alt": "example",
  "filename": "Example",
  "filetype": "example",
  "vimeo_uri": "example",
  "vimeo_picture": "example",
  "duration": 1,
  "vimeo_url": "example-item",
  "youtube_url": "example-item",
  "youtube_picture": "example",
  "thumbnail": "example",
  "gcs_url": "example-item",
  "gcs_480_30_url": "example-item",
  "gcs_720_30_url": "example-item",
  "gcs_1080_30_url": "example-item",
  "picture_gcs_url": "example-item",
  "transcode_status": "not_started",
  "owner_id": "6543210fedcba98765432100",
  "source_url": "example-item",
  "source_framing": "example",
  "origin": "example",
  "width": 1,
  "height": 1,
  "sequence": {
    "status": "example",
    "started_at": "example",
    "updated_at": "example",
    "step": "example",
    "done": 0,
    "total": 0,
    "ext": "example",
    "trim_start": 0,
    "trim_end": 0,
    "build_id": "example",
    "previous_base": "example",
    "frame_count": 0
  }
}

Create a storage folder with AI

Creates a folder (name) in the site's cloud storage. Answers {}.

User token

Needs the token of a signed-in user.

Parameters
namestring

The storage folder's name.

Status codes

200 401 500

POST/create-storage-folder
curl -X POST 'http://bulgariandebateassociation.max-media.io/create-storage-folder?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "name": "..." }'

Retrieve a download media

Downloads a media file as an attachment. A file in cloud storage answers { url } to download from; an older file stored in the database is sent directly.

Public

Public - no token needed.

Path parameters
idstringRequired

The ID of the download media.

Returns

Returns the Media object.

Status codes

200 404 500

GET/download-media/:id
curl -X GET 'http://bulgariandebateassociation.max-media.io/download-media/{id}?ionic=true'
Response
{
  "file": "example",
  "file_path": "example",
  "alt": "example",
  "filename": "Example",
  "filetype": "example",
  "vimeo_uri": "example",
  "vimeo_picture": "example",
  "duration": 1,
  "vimeo_url": "example-item",
  "youtube_url": "example-item",
  "youtube_picture": "example",
  "thumbnail": "example",
  "gcs_url": "example-item",
  "gcs_480_30_url": "example-item",
  "gcs_720_30_url": "example-item",
  "gcs_1080_30_url": "example-item",
  "picture_gcs_url": "example-item",
  "transcode_status": "not_started",
  "owner_id": "6543210fedcba98765432100",
  "source_url": "example-item",
  "source_framing": "example",
  "origin": "example",
  "width": 1,
  "height": 1,
  "sequence": {
    "status": "example",
    "started_at": "example",
    "updated_at": "example",
    "step": "example",
    "done": 0,
    "total": 0,
    "ext": "example",
    "trim_start": 0,
    "trim_end": 0,
    "build_id": "example",
    "previous_base": "example",
    "frame_count": 0
  }
}

Retrieve the media cdn

The CDN address media is served from; ?without_path for the bare host. Answers { media_cdn }.

User token

Needs the token of a signed-in user.

Query parameters
without_pathstring

Only media cdns with this without path.

Status codes

200 401 500

GET/get-media-cdn
curl -X GET 'http://bulgariandebateassociation.max-media.io/get-media-cdn?ionic=true&without_path=...' \
  -H 'Authorization: Bearer <TOKEN>'

Upload a media signed url

A signed cloud storage URL to upload a file to directly (name, type), and the media record it will be. Answers { url, media }: PUT the file to url, and the media record is ready to use. For large files, which skip the server.

User token

Needs the token of a signed-in user.

Parameters
namestring

The media signed url's name.

typestring

The media signed url's type.

durationstring

The media signed url's duration.

saveOwnerstring

The media signed url's save owner.

Status codes

200 401 500

POST/get-media-upload-signed-url
curl -X POST 'http://bulgariandebateassociation.max-media.io/get-media-upload-signed-url?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "name": "...", "type": "...", "duration": "...", "saveOwner": "..." }'
Response
{
  "file": "example",
  "file_path": "example",
  "alt": "example",
  "filename": "Example",
  "filetype": "example",
  "vimeo_uri": "example",
  "vimeo_picture": "example",
  "duration": 1,
  "vimeo_url": "example-item",
  "youtube_url": "example-item",
  "youtube_picture": "example",
  "thumbnail": "example",
  "gcs_url": "example-item",
  "gcs_480_30_url": "example-item",
  "gcs_720_30_url": "example-item",
  "gcs_1080_30_url": "example-item",
  "picture_gcs_url": "example-item",
  "transcode_status": "not_started",
  "owner_id": "6543210fedcba98765432100",
  "source_url": "example-item",
  "source_framing": "example",
  "origin": "example",
  "width": 1,
  "height": 1,
  "sequence": {
    "status": "example",
    "started_at": "example",
    "updated_at": "example",
    "step": "example",
    "done": 0,
    "total": 0,
    "ext": "example",
    "trim_start": 0,
    "trim_end": 0,
    "build_id": "example",
    "previous_base": "example",
    "frame_count": 0
  }
}

Upload a storage signed url

A signed URL to upload a file (name, type) to the site's cloud storage. Answers { url, generated_name }.

User token

Needs the token of a signed-in user.

Parameters
namestring

The storage signed url's name.

typestring

The storage signed url's type.

Status codes

200 401 500

POST/get-storage-upload-signed-url
curl -X POST 'http://bulgariandebateassociation.max-media.io/get-storage-upload-signed-url?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "name": "...", "type": "..." }'

Create a vimeo form

Starts a Vimeo upload and answers its upload form. Answers { form, uri }: the browser uploads straight to Vimeo with it.

User token

Needs the token of a signed-in user.

Status codes

200 401 500

POST/get-vimeo-form
curl -X POST 'http://bulgariandebateassociation.max-media.io/get-vimeo-form?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "file": "example",
  "file_path": "example",
  "alt": "example",
  "filename": "Example",
  "filetype": "example",
  "vimeo_uri": "example",
  "vimeo_picture": "example",
  "duration": 1,
  "vimeo_url": "example-item",
  "youtube_url": "example-item",
  "youtube_picture": "example",
  "thumbnail": "example",
  "gcs_url": "example-item",
  "gcs_480_30_url": "example-item",
  "gcs_720_30_url": "example-item",
  "gcs_1080_30_url": "example-item",
  "picture_gcs_url": "example-item",
  "transcode_status": "not_started",
  "owner_id": "6543210fedcba98765432100",
  "source_url": "example-item",
  "source_framing": "example",
  "origin": "example",
  "width": 1,
  "height": 1,
  "sequence": {
    "status": "example",
    "started_at": "example",
    "updated_at": "example",
    "step": "example",
    "done": 0,
    "total": 0,
    "ext": "example",
    "trim_start": 0,
    "trim_end": 0,
    "build_id": "example",
    "previous_base": "example",
    "frame_count": 0
  }
}

Import medias

Imports pictures from URLs into the media library. Answers 201 with the new media ids, in the order the URLs were sent.

User token

Needs the token of a signed-in user.

Returns

Returns the Media object.

Status codes

201 400 401 500

POST/import-medias
curl -X POST 'http://bulgariandebateassociation.max-media.io/import-medias?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "file": "example",
  "file_path": "example",
  "alt": "example",
  "filename": "Example",
  "filetype": "example",
  "vimeo_uri": "example",
  "vimeo_picture": "example",
  "duration": 1,
  "vimeo_url": "example-item",
  "youtube_url": "example-item",
  "youtube_picture": "example",
  "thumbnail": "example",
  "gcs_url": "example-item",
  "gcs_480_30_url": "example-item",
  "gcs_720_30_url": "example-item",
  "gcs_1080_30_url": "example-item",
  "picture_gcs_url": "example-item",
  "transcode_status": "not_started",
  "owner_id": "6543210fedcba98765432100",
  "source_url": "example-item",
  "source_framing": "example",
  "origin": "example",
  "width": 1,
  "height": 1,
  "sequence": {
    "status": "example",
    "started_at": "example",
    "updated_at": "example",
    "step": "example",
    "done": 0,
    "total": 0,
    "ext": "example",
    "trim_start": 0,
    "trim_end": 0,
    "build_id": "example",
    "previous_base": "example",
    "frame_count": 0
  }
}

Import medias from site

Imports a picture from another site (media, url) into the media library. Answers 201 { id }.

User token

Needs the token of a signed-in user.

Parameters
mediastring

The medias from site's media.

_idstring

The ID of the medias from site.

urlstring

The medias from site's URL slug, as in its address on the site.

Status codes

201 400 401 500

POST/import-medias-from-site
curl -X POST 'http://bulgariandebateassociation.max-media.io/import-medias-from-site?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "media": "...", "_id": "...", "url": "..." }'
Response
{
  "file": "example",
  "file_path": "example",
  "alt": "example",
  "filename": "Example",
  "filetype": "example",
  "vimeo_uri": "example",
  "vimeo_picture": "example",
  "duration": 1,
  "vimeo_url": "example-item",
  "youtube_url": "example-item",
  "youtube_picture": "example",
  "thumbnail": "example",
  "gcs_url": "example-item",
  "gcs_480_30_url": "example-item",
  "gcs_720_30_url": "example-item",
  "gcs_1080_30_url": "example-item",
  "picture_gcs_url": "example-item",
  "transcode_status": "not_started",
  "owner_id": "6543210fedcba98765432100",
  "source_url": "example-item",
  "source_framing": "example",
  "origin": "example",
  "width": 1,
  "height": 1,
  "sequence": {
    "status": "example",
    "started_at": "example",
    "updated_at": "example",
    "step": "example",
    "done": 0,
    "total": 0,
    "ext": "example",
    "trim_start": 0,
    "trim_end": 0,
    "build_id": "example",
    "previous_base": "example",
    "frame_count": 0
  }
}

Import media sections

The preview picture of an imported page file. Answers the image bytes, or 404.

Public

Public - no token needed.

Path parameters
idstringRequired

The ID of the media section.

Status codes

200 404 500

GET/media-about-section-import/:id
curl -X GET 'http://bulgariandebateassociation.max-media.io/media-about-section-import/{id}?ionic=true'
Response
{
  "title": "Example",
  "url": "example-item",
  "media": "example",
  "metadata": "example",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Retrieve the media instagram

Downloads the file at the URL given in the query and answers it, with open CORS. Reads no token and fetches any address it is given.

Public

Public - no token needed.

Query parameters
urlstring

The media instagram's URL slug, as in its address on the site.

Status codes

200 500

GET/media-instagram
curl -X GET 'http://bulgariandebateassociation.max-media.io/media-instagram?ionic=true&url=...'

Create a media sequence generate

Make a scroll animation's video with AI, from an idea and up to 3 of the user's pictures. The idea is rewritten into a scroll-friendly, safe video prompt first (utils/ai-builder/scroll-sequence-ai). Answers at once with an AsyncJob to poll (GET /async-jobs/:id); when it completes, its jobContext holds { media, summary, prompt } - the video, already cut into frames - or { error, refused }.

Admin token

Needs a site admin token.

Parameters
ideastring

The media sequence generate's idea.

mediaIdsstring

The media sequence generate's media ids.

qualitystring

The media sequence generate's quality.

Status codes

200 401 403 500

POST/media-sequence-generate
curl -X POST 'http://bulgariandebateassociation.max-media.io/media-sequence-generate?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "idea": "...", "mediaIds": "...", "quality": "..." }'

Retrieve the media sequence generate

What an AI scroll-animation video costs, in credits, by quality - and the user's. balance (null when the wallet cannot be read).

Admin token

Needs a site admin token.

Status codes

200 401

GET/media-sequence-generate/cost
curl -X GET 'http://bulgariandebateassociation.max-media.io/media-sequence-generate/cost?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

Retrieve a media sequence

The frames of a scroll animation - status, count, size and CDN. URLs. Public: the live site's player reads it.

Public

Public - no token needed.

Path parameters
idstringRequired

The ID of the media sequence.

Status codes

200 400 404 500

GET/media-sequence/:id
curl -X GET 'http://bulgariandebateassociation.max-media.io/media-sequence/{id}?ionic=true'
Response
{
  "file": "example",
  "file_path": "example",
  "alt": "example",
  "filename": "Example",
  "filetype": "example",
  "vimeo_uri": "example",
  "vimeo_picture": "example",
  "duration": 1,
  "vimeo_url": "example-item",
  "youtube_url": "example-item",
  "youtube_picture": "example",
  "thumbnail": "example",
  "gcs_url": "example-item",
  "gcs_480_30_url": "example-item",
  "gcs_720_30_url": "example-item",
  "gcs_1080_30_url": "example-item",
  "picture_gcs_url": "example-item",
  "transcode_status": "not_started",
  "owner_id": "6543210fedcba98765432100",
  "source_url": "example-item",
  "source_framing": "example",
  "origin": "example",
  "width": 1,
  "height": 1,
  "sequence": {
    "status": "example",
    "started_at": "example",
    "updated_at": "example",
    "step": "example",
    "done": 0,
    "total": 0,
    "ext": "example",
    "trim_start": 0,
    "trim_end": 0,
    "build_id": "example",
    "previous_base": "example",
    "frame_count": 0
  }
}

Create a media sequence

Cut a stored video into the still frames a scroll animation plays. Starts the build and answers 202 { status: 'processing' } at once; follow it with while a build runs, it answers the same (no second build) unless ?force.

Admin token

Needs a site admin token.

Path parameters
idstringRequired

The ID of the media sequence.

Query parameters
forcestring

Only media sequences with this force.

Parameters
trim_startstring

The media sequence's trim start.

Status codes

202 400 401 404 500

POST/media-sequence/:id
curl -X POST 'http://bulgariandebateassociation.max-media.io/media-sequence/{id}?ionic=true&force=...' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "trim_start": "..." }'
Response
{
  "file": "example",
  "file_path": "example",
  "alt": "example",
  "filename": "Example",
  "filetype": "example",
  "vimeo_uri": "example",
  "vimeo_picture": "example",
  "duration": 1,
  "vimeo_url": "example-item",
  "youtube_url": "example-item",
  "youtube_picture": "example",
  "thumbnail": "example",
  "gcs_url": "example-item",
  "gcs_480_30_url": "example-item",
  "gcs_720_30_url": "example-item",
  "gcs_1080_30_url": "example-item",
  "picture_gcs_url": "example-item",
  "transcode_status": "not_started",
  "owner_id": "6543210fedcba98765432100",
  "source_url": "example-item",
  "source_framing": "example",
  "origin": "example",
  "width": 1,
  "height": 1,
  "sequence": {
    "status": "example",
    "started_at": "example",
    "updated_at": "example",
    "step": "example",
    "done": 0,
    "total": 0,
    "ext": "example",
    "trim_start": 0,
    "trim_end": 0,
    "build_id": "example",
    "previous_base": "example",
    "frame_count": 0
  }
}

Create a media sequence

The browser could not finish (and says why) - so the build is not left "processing". Answers { ok: true }.

Admin token

Needs a site admin token.

Path parameters
idstringRequired

The ID of the media sequence.

Parameters
errorstring

The media sequence's error.

Status codes

200 400 401 404 500

POST/media-sequence/:id/client-fail
curl -X POST 'http://bulgariandebateassociation.max-media.io/media-sequence/{id}/client-fail?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "error": "..." }'
Response
{
  "file": "example",
  "file_path": "example",
  "alt": "example",
  "filename": "Example",
  "filetype": "example",
  "vimeo_uri": "example",
  "vimeo_picture": "example",
  "duration": 1,
  "vimeo_url": "example-item",
  "youtube_url": "example-item",
  "youtube_picture": "example",
  "thumbnail": "example",
  "gcs_url": "example-item",
  "gcs_480_30_url": "example-item",
  "gcs_720_30_url": "example-item",
  "gcs_1080_30_url": "example-item",
  "picture_gcs_url": "example-item",
  "transcode_status": "not_started",
  "owner_id": "6543210fedcba98765432100",
  "source_url": "example-item",
  "source_framing": "example",
  "origin": "example",
  "width": 1,
  "height": 1,
  "sequence": {
    "status": "example",
    "started_at": "example",
    "updated_at": "example",
    "step": "example",
    "done": 0,
    "total": 0,
    "ext": "example",
    "trim_start": 0,
    "trim_end": 0,
    "build_id": "example",
    "previous_base": "example",
    "frame_count": 0
  }
}

Create a media sequence

The frames are up: check them and mark the animation ready. Answers the frame manifest the page uses.

Admin token

Needs a site admin token.

Path parameters
idstringRequired

The ID of the media sequence.

Status codes

200 400 401 404 500

POST/media-sequence/:id/client-finish
curl -X POST 'http://bulgariandebateassociation.max-media.io/media-sequence/{id}/client-finish?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "file": "example",
  "file_path": "example",
  "alt": "example",
  "filename": "Example",
  "filetype": "example",
  "vimeo_uri": "example",
  "vimeo_picture": "example",
  "duration": 1,
  "vimeo_url": "example-item",
  "youtube_url": "example-item",
  "youtube_picture": "example",
  "thumbnail": "example",
  "gcs_url": "example-item",
  "gcs_480_30_url": "example-item",
  "gcs_720_30_url": "example-item",
  "gcs_1080_30_url": "example-item",
  "picture_gcs_url": "example-item",
  "transcode_status": "not_started",
  "owner_id": "6543210fedcba98765432100",
  "source_url": "example-item",
  "source_framing": "example",
  "origin": "example",
  "width": 1,
  "height": 1,
  "sequence": {
    "status": "example",
    "started_at": "example",
    "updated_at": "example",
    "step": "example",
    "done": 0,
    "total": 0,
    "ext": "example",
    "trim_start": 0,
    "trim_end": 0,
    "build_id": "example",
    "previous_base": "example",
    "frame_count": 0
  }
}

Create a media sequence

The admin's heartbeat while it builds: frames done so far. Answers { ok: true }.

Admin token

Needs a site admin token.

Path parameters
idstringRequired

The ID of the media sequence.

Status codes

200 400 401 404 500

POST/media-sequence/:id/client-progress
curl -X POST 'http://bulgariandebateassociation.max-media.io/media-sequence/{id}/client-progress?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "file": "example",
  "file_path": "example",
  "alt": "example",
  "filename": "Example",
  "filetype": "example",
  "vimeo_uri": "example",
  "vimeo_picture": "example",
  "duration": 1,
  "vimeo_url": "example-item",
  "youtube_url": "example-item",
  "youtube_picture": "example",
  "thumbnail": "example",
  "gcs_url": "example-item",
  "gcs_480_30_url": "example-item",
  "gcs_720_30_url": "example-item",
  "gcs_1080_30_url": "example-item",
  "picture_gcs_url": "example-item",
  "transcode_status": "not_started",
  "owner_id": "6543210fedcba98765432100",
  "source_url": "example-item",
  "source_framing": "example",
  "origin": "example",
  "width": 1,
  "height": 1,
  "sequence": {
    "status": "example",
    "started_at": "example",
    "updated_at": "example",
    "step": "example",
    "done": 0,
    "total": 0,
    "ext": "example",
    "trim_start": 0,
    "trim_end": 0,
    "build_id": "example",
    "previous_base": "example",
    "frame_count": 0
  }
}

Create a media sequence

Signed upload links for every frame the admin is about to make. For the scroll animation: the admin cuts the video into frames in the browser. 404 "Video not found", 409 when it is already being processed.

Admin token

Needs a site admin token.

Path parameters
idstringRequired

The ID of the media sequence.

Parameters
forcestring

The media sequence's force.

Status codes

200 400 401 404 409 500

POST/media-sequence/:id/client-start
curl -X POST 'http://bulgariandebateassociation.max-media.io/media-sequence/{id}/client-start?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "force": "..." }'
Response
{
  "file": "example",
  "file_path": "example",
  "alt": "example",
  "filename": "Example",
  "filetype": "example",
  "vimeo_uri": "example",
  "vimeo_picture": "example",
  "duration": 1,
  "vimeo_url": "example-item",
  "youtube_url": "example-item",
  "youtube_picture": "example",
  "thumbnail": "example",
  "gcs_url": "example-item",
  "gcs_480_30_url": "example-item",
  "gcs_720_30_url": "example-item",
  "gcs_1080_30_url": "example-item",
  "picture_gcs_url": "example-item",
  "transcode_status": "not_started",
  "owner_id": "6543210fedcba98765432100",
  "source_url": "example-item",
  "source_framing": "example",
  "origin": "example",
  "width": 1,
  "height": 1,
  "sequence": {
    "status": "example",
    "started_at": "example",
    "updated_at": "example",
    "step": "example",
    "done": 0,
    "total": 0,
    "ext": "example",
    "trim_start": 0,
    "trim_end": 0,
    "build_id": "example",
    "previous_base": "example",
    "frame_count": 0
  }
}

Retrieve a media tracker

The picture of a progress entry. Answers the image bytes, or 404.

Public

Public - no token needed.

Path parameters
idstringRequired

The ID of the media tracker.

Status codes

200 404 500

GET/media-tracker/:id
curl -X GET 'http://bulgariandebateassociation.max-media.io/media-tracker/{id}?ionic=true'
Response
{
  "score": "example",
  "user_id": "6543210fedcba98765432100",
  "media": "example",
  "additional_fields": {},
  "goal": {},
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Create a media

Creates a media record. Multipart upload of one or more files (medias). Pictures are resized and stored; answers the media record, or redirects back for a website form.

User token

Needs the token of a signed-in user.

Query parameters
skip_owner_idstring

Only medias with this skip owner id.

Parameters
bodystring

The media's body.

altstring

Img alt (same as filename if not specified).

youtube_urlstring

Link to the video on YouTube.

vimeo_urlstring

Link to the video on Vimeo.

picture_gcs_urlstring

The picture's address in cloud storage.

Returns

Returns the Media object.

Status codes

201 400 401 500

POST/medias
curl -X POST 'http://bulgariandebateassociation.max-media.io/medias?ionic=true&skip_owner_id=...' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "body": "...", "alt": "...", "youtube_url": "...", "vimeo_url": "...", "picture_gcs_url": "..." }'
Response
{
  "file": "example",
  "file_path": "example",
  "alt": "example",
  "filename": "Example",
  "filetype": "example",
  "vimeo_uri": "example",
  "vimeo_picture": "example",
  "duration": 1,
  "vimeo_url": "example-item",
  "youtube_url": "example-item",
  "youtube_picture": "example",
  "thumbnail": "example",
  "gcs_url": "example-item",
  "gcs_480_30_url": "example-item",
  "gcs_720_30_url": "example-item",
  "gcs_1080_30_url": "example-item",
  "picture_gcs_url": "example-item",
  "transcode_status": "not_started",
  "owner_id": "6543210fedcba98765432100",
  "source_url": "example-item",
  "source_framing": "example",
  "origin": "example",
  "width": 1,
  "height": 1,
  "sequence": {
    "status": "example",
    "started_at": "example",
    "updated_at": "example",
    "step": "example",
    "done": 0,
    "total": 0,
    "ext": "example",
    "trim_start": 0,
    "trim_end": 0,
    "build_id": "example",
    "previous_base": "example",
    "frame_count": 0
  }
}

Retrieve a medias avatar

A picture 160px wide, as an avatar. Resized on the fly and cached for an hour; 404 when there is no such media.

Public

Public - no token needed.

Path parameters
idstringRequired

The ID of the medias avatar.

Status codes

200 404 500

GET/medias-avatar/:id
curl -X GET 'http://bulgariandebateassociation.max-media.io/medias-avatar/{id}?ionic=true'
Response
{
  "file": "example",
  "file_path": "example",
  "alt": "example",
  "filename": "Example",
  "filetype": "example",
  "vimeo_uri": "example",
  "vimeo_picture": "example",
  "duration": 1,
  "vimeo_url": "example-item",
  "youtube_url": "example-item",
  "youtube_picture": "example",
  "thumbnail": "example",
  "gcs_url": "example-item",
  "gcs_480_30_url": "example-item",
  "gcs_720_30_url": "example-item",
  "gcs_1080_30_url": "example-item",
  "picture_gcs_url": "example-item",
  "transcode_status": "not_started",
  "owner_id": "6543210fedcba98765432100",
  "source_url": "example-item",
  "source_framing": "example",
  "origin": "example",
  "width": 1,
  "height": 1,
  "sequence": {
    "status": "example",
    "started_at": "example",
    "updated_at": "example",
    "step": "example",
    "done": 0,
    "total": 0,
    "ext": "example",
    "trim_start": 0,
    "trim_end": 0,
    "build_id": "example",
    "previous_base": "example",
    "frame_count": 0
  }
}

Count medias

How many media records the site has. Answers { videos_count, pictures_count }.

User token

Needs the token of a signed-in user.

Returns

Returns a list of Media objects.

Status codes

200 401 500

GET/medias-count
curl -X GET 'http://bulgariandebateassociation.max-media.io/medias-count?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
[
  {
    "file": "example",
    "file_path": "example",
    "alt": "example",
    "filename": "Example",
    "filetype": "example",
    "vimeo_uri": "example",
    "vimeo_picture": "example",
    "duration": 1,
    "vimeo_url": "example-item",
    "youtube_url": "example-item",
    "youtube_picture": "example",
    "thumbnail": "example",
    "gcs_url": "example-item",
    "gcs_480_30_url": "example-item",
    "gcs_720_30_url": "example-item",
    "gcs_1080_30_url": "example-item",
    "picture_gcs_url": "example-item",
    "transcode_status": "not_started",
    "owner_id": "6543210fedcba98765432100",
    "source_url": "example-item",
    "source_framing": "example",
    "origin": "example",
    "width": 1,
    "height": 1,
    "sequence": {
      "status": "example",
      "started_at": "example",
      "updated_at": "example",
      "step": "example",
      "done": 0,
      "total": 0,
      "ext": "example",
      "trim_start": 0,
      "trim_end": 0,
      "build_id": "example",
      "previous_base": "example",
      "frame_count": 0
    }
  }
]

Retrieve a medias form

A file sent with a form, by its position. Answers the file bytes, or 404.

Public

Public - no token needed.

Path parameters
form_idstringRequired

The medias form's form id.

img_indexstringRequired

The medias form's img index.

Returns

Returns the Form object.

Status codes

200 404 500

GET/medias-form/:form_id&:img_index
curl -X GET 'http://bulgariandebateassociation.max-media.io/medias-form/{form_id}&{img_index}?ionic=true'
Response
{
  "name": "Example",
  "email": "jane@example.com",
  "subject": "example",
  "body": "Text shown on the site.",
  "medias": [],
  "additional": [
    {
      "title": "Example",
      "option": "example",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Retrieve a medias large

A picture 1920px wide. Resized on the fly and cached for an hour; 404 when there is no such media.

Public

Public - no token needed.

Path parameters
idstringRequired

The ID of the medias large.

Status codes

200 404 500

GET/medias-large/:id
curl -X GET 'http://bulgariandebateassociation.max-media.io/medias-large/{id}?ionic=true'
Response
{
  "file": "example",
  "file_path": "example",
  "alt": "example",
  "filename": "Example",
  "filetype": "example",
  "vimeo_uri": "example",
  "vimeo_picture": "example",
  "duration": 1,
  "vimeo_url": "example-item",
  "youtube_url": "example-item",
  "youtube_picture": "example",
  "thumbnail": "example",
  "gcs_url": "example-item",
  "gcs_480_30_url": "example-item",
  "gcs_720_30_url": "example-item",
  "gcs_1080_30_url": "example-item",
  "picture_gcs_url": "example-item",
  "transcode_status": "not_started",
  "owner_id": "6543210fedcba98765432100",
  "source_url": "example-item",
  "source_framing": "example",
  "origin": "example",
  "width": 1,
  "height": 1,
  "sequence": {
    "status": "example",
    "started_at": "example",
    "updated_at": "example",
    "step": "example",
    "done": 0,
    "total": 0,
    "ext": "example",
    "trim_start": 0,
    "trim_end": 0,
    "build_id": "example",
    "previous_base": "example",
    "frame_count": 0
  }
}

Retrieve a medias marker

A picture for a map marker, resized (?size). Cached for an hour.

Public

Public - no token needed.

Path parameters
idstringRequired

The ID of the medias marker.

Query parameters
sizestring

Only medias markers with this size.

Status codes

200 404 500

GET/medias-marker/:id
curl -X GET 'http://bulgariandebateassociation.max-media.io/medias-marker/{id}?ionic=true&size=...'
Response
{
  "file": "example",
  "file_path": "example",
  "alt": "example",
  "filename": "Example",
  "filetype": "example",
  "vimeo_uri": "example",
  "vimeo_picture": "example",
  "duration": 1,
  "vimeo_url": "example-item",
  "youtube_url": "example-item",
  "youtube_picture": "example",
  "thumbnail": "example",
  "gcs_url": "example-item",
  "gcs_480_30_url": "example-item",
  "gcs_720_30_url": "example-item",
  "gcs_1080_30_url": "example-item",
  "picture_gcs_url": "example-item",
  "transcode_status": "not_started",
  "owner_id": "6543210fedcba98765432100",
  "source_url": "example-item",
  "source_framing": "example",
  "origin": "example",
  "width": 1,
  "height": 1,
  "sequence": {
    "status": "example",
    "started_at": "example",
    "updated_at": "example",
    "step": "example",
    "done": 0,
    "total": 0,
    "ext": "example",
    "trim_start": 0,
    "trim_end": 0,
    "build_id": "example",
    "previous_base": "example",
    "frame_count": 0
  }
}

Retrieve a medias medium

A picture 1280px wide. Resized on the fly and cached for an hour; 404 when there is no such media.

Public

Public - no token needed.

Path parameters
idstringRequired

The ID of the medias medium.

Status codes

200 404 500

GET/medias-medium/:id
curl -X GET 'http://bulgariandebateassociation.max-media.io/medias-medium/{id}?ionic=true'
Response
{
  "file": "example",
  "file_path": "example",
  "alt": "example",
  "filename": "Example",
  "filetype": "example",
  "vimeo_uri": "example",
  "vimeo_picture": "example",
  "duration": 1,
  "vimeo_url": "example-item",
  "youtube_url": "example-item",
  "youtube_picture": "example",
  "thumbnail": "example",
  "gcs_url": "example-item",
  "gcs_480_30_url": "example-item",
  "gcs_720_30_url": "example-item",
  "gcs_1080_30_url": "example-item",
  "picture_gcs_url": "example-item",
  "transcode_status": "not_started",
  "owner_id": "6543210fedcba98765432100",
  "source_url": "example-item",
  "source_framing": "example",
  "origin": "example",
  "width": 1,
  "height": 1,
  "sequence": {
    "status": "example",
    "started_at": "example",
    "updated_at": "example",
    "step": "example",
    "done": 0,
    "total": 0,
    "ext": "example",
    "trim_start": 0,
    "trim_end": 0,
    "build_id": "example",
    "previous_base": "example",
    "frame_count": 0
  }
}

Retrieve a medias object

Get a Media object. The media record without its file. 404 "not found".

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the medias object.

Status codes

200 401 404 500

GET/medias-object/:id
curl -X GET 'http://bulgariandebateassociation.max-media.io/medias-object/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "file": "example",
  "file_path": "example",
  "alt": "example",
  "filename": "Example",
  "filetype": "example",
  "vimeo_uri": "example",
  "vimeo_picture": "example",
  "duration": 1,
  "vimeo_url": "example-item",
  "youtube_url": "example-item",
  "youtube_picture": "example",
  "thumbnail": "example",
  "gcs_url": "example-item",
  "gcs_480_30_url": "example-item",
  "gcs_720_30_url": "example-item",
  "gcs_1080_30_url": "example-item",
  "picture_gcs_url": "example-item",
  "transcode_status": "not_started",
  "owner_id": "6543210fedcba98765432100",
  "source_url": "example-item",
  "source_framing": "example",
  "origin": "example",
  "width": 1,
  "height": 1,
  "sequence": {
    "status": "example",
    "started_at": "example",
    "updated_at": "example",
    "step": "example",
    "done": 0,
    "total": 0,
    "ext": "example",
    "trim_start": 0,
    "trim_end": 0,
    "build_id": "example",
    "previous_base": "example",
    "frame_count": 0
  }
}

Retrieve a medias og

A picture as a JPEG sized for link previews (Open Graph). 1200×630; a GIF is sent as its first frame, since link previews do not play GIFs.

Public

Public - no token needed.

Path parameters
idstringRequired

The ID of the medias og.

Status codes

200 404 500

GET/medias-og/:id
curl -X GET 'http://bulgariandebateassociation.max-media.io/medias-og/{id}?ionic=true'
Response
{
  "file": "example",
  "file_path": "example",
  "alt": "example",
  "filename": "Example",
  "filetype": "example",
  "vimeo_uri": "example",
  "vimeo_picture": "example",
  "duration": 1,
  "vimeo_url": "example-item",
  "youtube_url": "example-item",
  "youtube_picture": "example",
  "thumbnail": "example",
  "gcs_url": "example-item",
  "gcs_480_30_url": "example-item",
  "gcs_720_30_url": "example-item",
  "gcs_1080_30_url": "example-item",
  "picture_gcs_url": "example-item",
  "transcode_status": "not_started",
  "owner_id": "6543210fedcba98765432100",
  "source_url": "example-item",
  "source_framing": "example",
  "origin": "example",
  "width": 1,
  "height": 1,
  "sequence": {
    "status": "example",
    "started_at": "example",
    "updated_at": "example",
    "step": "example",
    "done": 0,
    "total": 0,
    "ext": "example",
    "trim_start": 0,
    "trim_end": 0,
    "build_id": "example",
    "previous_base": "example",
    "frame_count": 0
  }
}

Retrieve a medias responsive

A picture sized for its column. 1280px wide by default; ?size scales it to the column's width (up to 2560px). Resized on the fly and cached for an hour; 404 when there is no such media.

Public

Public - no token needed.

Path parameters
idstringRequired

The ID of the medias responsive.

Query parameters
sizestring

Only medias responsives with this size.

isFluidstring

Only medias responsives with this is fluid.

Status codes

200 404 500

GET/medias-responsive/:id
curl -X GET 'http://bulgariandebateassociation.max-media.io/medias-responsive/{id}?ionic=true&size=...&isFluid=...'
Response
{
  "file": "example",
  "file_path": "example",
  "alt": "example",
  "filename": "Example",
  "filetype": "example",
  "vimeo_uri": "example",
  "vimeo_picture": "example",
  "duration": 1,
  "vimeo_url": "example-item",
  "youtube_url": "example-item",
  "youtube_picture": "example",
  "thumbnail": "example",
  "gcs_url": "example-item",
  "gcs_480_30_url": "example-item",
  "gcs_720_30_url": "example-item",
  "gcs_1080_30_url": "example-item",
  "picture_gcs_url": "example-item",
  "transcode_status": "not_started",
  "owner_id": "6543210fedcba98765432100",
  "source_url": "example-item",
  "source_framing": "example",
  "origin": "example",
  "width": 1,
  "height": 1,
  "sequence": {
    "status": "example",
    "started_at": "example",
    "updated_at": "example",
    "step": "example",
    "done": 0,
    "total": 0,
    "ext": "example",
    "trim_start": 0,
    "trim_end": 0,
    "build_id": "example",
    "previous_base": "example",
    "frame_count": 0
  }
}

Retrieve the medias storage

How much storage the site's media uses. Answers the total size of the site's stored files.

User token

Needs the token of a signed-in user.

Status codes

200 401 500

GET/medias-storage
curl -X GET 'http://bulgariandebateassociation.max-media.io/medias-storage?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

Retrieve a medias thumbnail

A picture 400px wide, as a thumbnail. Resized on the fly and cached for an hour; 404 when there is no such media.

Public

Public - no token needed.

Path parameters
idstringRequired

The ID of the medias thumbnail.

Status codes

200 404 500

GET/medias-thumbnail/:id
curl -X GET 'http://bulgariandebateassociation.max-media.io/medias-thumbnail/{id}?ionic=true'
Response
{
  "file": "example",
  "file_path": "example",
  "alt": "example",
  "filename": "Example",
  "filetype": "example",
  "vimeo_uri": "example",
  "vimeo_picture": "example",
  "duration": 1,
  "vimeo_url": "example-item",
  "youtube_url": "example-item",
  "youtube_picture": "example",
  "thumbnail": "example",
  "gcs_url": "example-item",
  "gcs_480_30_url": "example-item",
  "gcs_720_30_url": "example-item",
  "gcs_1080_30_url": "example-item",
  "picture_gcs_url": "example-item",
  "transcode_status": "not_started",
  "owner_id": "6543210fedcba98765432100",
  "source_url": "example-item",
  "source_framing": "example",
  "origin": "example",
  "width": 1,
  "height": 1,
  "sequence": {
    "status": "example",
    "started_at": "example",
    "updated_at": "example",
    "step": "example",
    "done": 0,
    "total": 0,
    "ext": "example",
    "trim_start": 0,
    "trim_end": 0,
    "build_id": "example",
    "previous_base": "example",
    "frame_count": 0
  }
}

Retrieve a medias xlarge

A picture 2560px wide. At quality 85. Product answers link their pictures here. Resized on the fly and cached for an hour; 404 when there is no such media.

Public

Public - no token needed.

Path parameters
idstringRequired

The ID of the medias xlarge.

Status codes

200 404 500

GET/medias-xlarge/:id
curl -X GET 'http://bulgariandebateassociation.max-media.io/medias-xlarge/{id}?ionic=true'
Response
{
  "file": "example",
  "file_path": "example",
  "alt": "example",
  "filename": "Example",
  "filetype": "example",
  "vimeo_uri": "example",
  "vimeo_picture": "example",
  "duration": 1,
  "vimeo_url": "example-item",
  "youtube_url": "example-item",
  "youtube_picture": "example",
  "thumbnail": "example",
  "gcs_url": "example-item",
  "gcs_480_30_url": "example-item",
  "gcs_720_30_url": "example-item",
  "gcs_1080_30_url": "example-item",
  "picture_gcs_url": "example-item",
  "transcode_status": "not_started",
  "owner_id": "6543210fedcba98765432100",
  "source_url": "example-item",
  "source_framing": "example",
  "origin": "example",
  "width": 1,
  "height": 1,
  "sequence": {
    "status": "example",
    "started_at": "example",
    "updated_at": "example",
    "step": "example",
    "done": 0,
    "total": 0,
    "ext": "example",
    "trim_start": 0,
    "trim_end": 0,
    "build_id": "example",
    "previous_base": "example",
    "frame_count": 0
  }
}

Retrieve a media

A picture 860px wide. The default size for pictures in pages. Resized on the fly and cached for an hour; 404 when there is no such media.

Public

Public - no token needed.

Path parameters
idstringRequired

The ID of the media.

Returns

Returns the Media object.

Status codes

200 404 500

GET/medias/:id
curl -X GET 'http://bulgariandebateassociation.max-media.io/medias/{id}?ionic=true'
Response
{
  "file": "example",
  "file_path": "example",
  "alt": "example",
  "filename": "Example",
  "filetype": "example",
  "vimeo_uri": "example",
  "vimeo_picture": "example",
  "duration": 1,
  "vimeo_url": "example-item",
  "youtube_url": "example-item",
  "youtube_picture": "example",
  "thumbnail": "example",
  "gcs_url": "example-item",
  "gcs_480_30_url": "example-item",
  "gcs_720_30_url": "example-item",
  "gcs_1080_30_url": "example-item",
  "picture_gcs_url": "example-item",
  "transcode_status": "not_started",
  "owner_id": "6543210fedcba98765432100",
  "source_url": "example-item",
  "source_framing": "example",
  "origin": "example",
  "width": 1,
  "height": 1,
  "sequence": {
    "status": "example",
    "started_at": "example",
    "updated_at": "example",
    "step": "example",
    "done": 0,
    "total": 0,
    "ext": "example",
    "trim_start": 0,
    "trim_end": 0,
    "build_id": "example",
    "previous_base": "example",
    "frame_count": 0
  }
}

Update a media

Updates a media record. 404 when there is no such media.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the media.

Parameters
altstring

Img alt (same as filename if not specified).

filenamestring

Name of the stored file.

thumbnailstring

Small preview of the file.

Returns

Returns the Media object.

Status codes

200 401 404 500

PATCH/medias/:id
curl -X PATCH 'http://bulgariandebateassociation.max-media.io/medias/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "alt": "...", "filename": "...", "thumbnail": "..." }'
Response
{
  "file": "example",
  "file_path": "example",
  "alt": "example",
  "filename": "Example",
  "filetype": "example",
  "vimeo_uri": "example",
  "vimeo_picture": "example",
  "duration": 1,
  "vimeo_url": "example-item",
  "youtube_url": "example-item",
  "youtube_picture": "example",
  "thumbnail": "example",
  "gcs_url": "example-item",
  "gcs_480_30_url": "example-item",
  "gcs_720_30_url": "example-item",
  "gcs_1080_30_url": "example-item",
  "picture_gcs_url": "example-item",
  "transcode_status": "not_started",
  "owner_id": "6543210fedcba98765432100",
  "source_url": "example-item",
  "source_framing": "example",
  "origin": "example",
  "width": 1,
  "height": 1,
  "sequence": {
    "status": "example",
    "started_at": "example",
    "updated_at": "example",
    "step": "example",
    "done": 0,
    "total": 0,
    "ext": "example",
    "trim_start": 0,
    "trim_end": 0,
    "build_id": "example",
    "previous_base": "example",
    "frame_count": 0
  }
}

Delete a media

Deletes a media record. Also deletes the stored file. 401 when the media belongs to another user. Records that still use it keep its id.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the media.

Returns

Returns an empty answer on success.

Status codes

200 401 404 500

DELETE/medias/:id
curl -X DELETE 'http://bulgariandebateassociation.max-media.io/medias/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

Retrieve an app media

A picture resized for the installable app (?size_x, ?size_y). Answers the image bytes, or 404.

Public

Public - no token needed.

Path parameters
idstringRequired

The ID of the app media.

Query parameters
size_xstring

Only app medias with this size x.

size_ystring

Only app medias with this size y.

Returns

Returns the Media object.

Status codes

200 404 500

GET/pwa-media/:id
curl -X GET 'http://bulgariandebateassociation.max-media.io/pwa-media/{id}?ionic=true&size_x=...&size_y=...'
Response
{
  "file": "example",
  "file_path": "example",
  "alt": "example",
  "filename": "Example",
  "filetype": "example",
  "vimeo_uri": "example",
  "vimeo_picture": "example",
  "duration": 1,
  "vimeo_url": "example-item",
  "youtube_url": "example-item",
  "youtube_picture": "example",
  "thumbnail": "example",
  "gcs_url": "example-item",
  "gcs_480_30_url": "example-item",
  "gcs_720_30_url": "example-item",
  "gcs_1080_30_url": "example-item",
  "picture_gcs_url": "example-item",
  "transcode_status": "not_started",
  "owner_id": "6543210fedcba98765432100",
  "source_url": "example-item",
  "source_framing": "example",
  "origin": "example",
  "width": 1,
  "height": 1,
  "sequence": {
    "status": "example",
    "started_at": "example",
    "updated_at": "example",
    "step": "example",
    "done": 0,
    "total": 0,
    "ext": "example",
    "trim_start": 0,
    "trim_end": 0,
    "build_id": "example",
    "previous_base": "example",
    "frame_count": 0
  }
}

Retrieve a QR code code media

A ticket's QR code as a PNG. 404 when there is no such ticket.

Public

Public - no token needed.

Path parameters
idstringRequired

The ID of the QR code code media.

Status codes

200 404 500

GET/qr-code-medias/:id
curl -X GET 'http://bulgariandebateassociation.max-media.io/qr-code-medias/{id}?ionic=true'
Response
{
  "event": "6543210fedcba98765432100",
  "date": 1,
  "section": 1,
  "subsection": 1,
  "row": 1,
  "seat": 1,
  "row_index_formated": 1,
  "seat_index_formated": 1,
  "lead_id": "6543210fedcba98765432100",
  "socket_id": "example",
  "status": "frozen",
  "expiration_time": "2026-11-04T12:00:00.000Z",
  "qr_code": "6543210fedcba98765432100",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z",
  "tier": {
    "name": "Example",
    "price": 0
  }
}

Remove a remove media quality

Deletes one transcoded quality of a video (media_id, transcode). Answers { media }.

User token

Needs the token of a signed-in user.

Parameters
media_idstring

The remove media quality's media id.

transcodestring

The remove media quality's transcode.

Status codes

200 401 404 500

PATCH/remove-media-quality
curl -X PATCH 'http://bulgariandebateassociation.max-media.io/remove-media-quality?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "media_id": "...", "transcode": "..." }'
Response
{
  "file": "example",
  "file_path": "example",
  "alt": "example",
  "filename": "Example",
  "filetype": "example",
  "vimeo_uri": "example",
  "vimeo_picture": "example",
  "duration": 1,
  "vimeo_url": "example-item",
  "youtube_url": "example-item",
  "youtube_picture": "example",
  "thumbnail": "example",
  "gcs_url": "example-item",
  "gcs_480_30_url": "example-item",
  "gcs_720_30_url": "example-item",
  "gcs_1080_30_url": "example-item",
  "picture_gcs_url": "example-item",
  "transcode_status": "not_started",
  "owner_id": "6543210fedcba98765432100",
  "source_url": "example-item",
  "source_framing": "example",
  "origin": "example",
  "width": 1,
  "height": 1,
  "sequence": {
    "status": "example",
    "started_at": "example",
    "updated_at": "example",
    "step": "example",
    "done": 0,
    "total": 0,
    "ext": "example",
    "trim_start": 0,
    "trim_end": 0,
    "build_id": "example",
    "previous_base": "example",
    "frame_count": 0
  }
}

Update the storage file

Deletes a file (file) from the site's cloud storage. Only inside the site's own folder.

User token

Needs the token of a signed-in user.

Parameters
filestring

The storage file's file.

Status codes

200 401 500

PATCH/storage-file
curl -X PATCH 'http://bulgariandebateassociation.max-media.io/storage-file?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "file": "..." }'

List all storage files

Files and folders in the site's cloud storage under ?folder_path. Only the site's own folder: a path cannot reach another site's files.

Admin token

Needs a site admin token.

Query parameters
folder_pathstring

Only storage files with this folder path.

Status codes

200 401 500

GET/storage-files
curl -X GET 'http://bulgariandebateassociation.max-media.io/storage-files?ionic=true&folder_path=...' \
  -H 'Authorization: Bearer <TOKEN>'

List all file routes

The files served at the site's root (verification files and the like). Answers an array, newest first.

Admin token

Needs a site admin token.

Returns

Returns a list of FileRoute objects.

Status codes

200 401 500

GET/file-routes
curl -X GET 'http://bulgariandebateassociation.max-media.io/file-routes?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
[
  {
    "url": "example-item",
    "content_type": "Text shown on the site.",
    "_id": "6543210fedcba98765432100",
    "updatedAt": "2026-11-04T12:00:00.000Z",
    "createdAt": "2026-11-04T12:00:00.000Z"
  }
]

Create a file route

Creates a root file route. The file must already be in the site's cloud storage (gcs_key) and be at most 2MB; url is the root path it is served at. Answers 201 { id }.

Admin token

Needs a site admin token.

Parameters
urlstring

The file route's URL slug, as in its address on the site.

content_typestring

Optional content type override.

Returns

Returns the FileRoute object.

Status codes

201 400 401 500

POST/file-routes
curl -X POST 'http://bulgariandebateassociation.max-media.io/file-routes?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "url": "...", "content_type": "..." }'
Response
{
  "url": "example-item",
  "content_type": "Text shown on the site.",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Update a file route

Updates a root file route. The same checks as creating one. 404 when there is no such route.

Admin token

Needs a site admin token.

Path parameters
idstringRequired

The ID of the file route.

Parameters
urlstring

The file route's URL slug, as in its address on the site.

content_typestring

Optional content type override.

Returns

Returns the FileRoute object.

Status codes

200 400 401 404 500

PATCH/file-routes/:id
curl -X PATCH 'http://bulgariandebateassociation.max-media.io/file-routes/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "url": "...", "content_type": "..." }'
Response
{
  "url": "example-item",
  "content_type": "Text shown on the site.",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Delete a file route

Deletes a root file route. Answers the deleted record, or 404. Records that point to it are not changed.

Admin token

Needs a site admin token.

Path parameters
idstringRequired

The ID of the file route.

Returns

Returns an empty answer on success.

Status codes

200 401 404 500

DELETE/file-routes/:id
curl -X DELETE 'http://bulgariandebateassociation.max-media.io/file-routes/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

Retrieve the QR code code

Ticket QR codes. Answers an array of every record.

Admin token

Needs a site admin token.

Status codes

200 401 500

GET/qr-code
curl -X GET 'http://bulgariandebateassociation.max-media.io/qr-code?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

Create a QR code code

Creates a ticket QR code. Answers 201 with no body.

Admin token

Needs a site admin token.

Status codes

201 400 401 500

POST/qr-code
curl -X POST 'http://bulgariandebateassociation.max-media.io/qr-code?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "ticket": "6543210fedcba98765432100",
  "status": "used",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Retrieve a QR code code

One ticket QR code. 404 when there is no such record.

Admin token

Needs a site admin token.

Path parameters
idstringRequired

The ID of the QR code code.

Status codes

200 401 404 500

GET/qr-code/:id
curl -X GET 'http://bulgariandebateassociation.max-media.io/qr-code/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "ticket": "6543210fedcba98765432100",
  "status": "used",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Update a QR code code

Updates an alert. Fields outside the allowed list are silently ignored. Answers the updated record, or 404.

Admin token

Needs a site admin token.

Path parameters
idstringRequired

The ID of the QR code code.

Status codes

200 400 401 404 500

PATCH/qr-code/:id
curl -X PATCH 'http://bulgariandebateassociation.max-media.io/qr-code/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "ticket": "6543210fedcba98765432100",
  "status": "used",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Retrieve a single video

One video's page with its comments and the rest of its playlist. 404 "Not found.". Answers { video, videos, collection } with ?ionic.

Optional userPage access

Works without a token; with a user token the answer is personal.

Path parameters
idstringRequired

The ID of the single video.

Returns

Returns the Video object.

Status codes

200 401 402 404 500

GET/single-video/:id
curl -X GET 'http://bulgariandebateassociation.max-media.io/single-video/{id}?ionic=true'
Response
{
  "name": "Example",
  "link": "example-item",
  "collection_id": "6543210fedcba98765432100",
  "media_id": "6543210fedcba98765432100",
  "selected": false,
  "custom_1": "example",
  "custom_2": "example",
  "custom_3": "example",
  "suitability_price_plans": [
    "6543210fedcba98765432101"
  ],
  "isSuitable": false,
  "views": [
    "6543210fedcba98765432101"
  ],
  "total_views": 0,
  "times_showed": 0,
  "owner_id": "6543210fedcba98765432100",
  "requiresLogin": false,
  "requiresSubscription": false,
  "price_plan_ids": [
    "example"
  ],
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

List all videos

The videos page, or the videos as JSON with ?ionic: filtered by playlist and published state, and sorted. Paged with ?skip, filtered by ?collection and ?published; ?sortBy sets the order.

User with accessOptional user

Needs a signed-in user whose plan grants access.

Query parameters
publishedstring

Only videos with this published.

sortBystring

The order of the results.

collectionstring

Only results in this collection.

Returns

Returns a list of Video objects.

Status codes

200 401 402 404 500

GET/videos
curl -X GET 'http://bulgariandebateassociation.max-media.io/videos?ionic=true&published=...&sortBy=...&collection=...' \
  -H 'Authorization: Bearer <TOKEN>'
Response
[
  {
    "name": "Example",
    "link": "example-item",
    "collection_id": "6543210fedcba98765432100",
    "media_id": "6543210fedcba98765432100",
    "selected": false,
    "custom_1": "example",
    "custom_2": "example",
    "custom_3": "example",
    "suitability_price_plans": [
      "6543210fedcba98765432101"
    ],
    "isSuitable": false,
    "views": [
      "6543210fedcba98765432101"
    ],
    "total_views": 0,
    "times_showed": 0,
    "owner_id": "6543210fedcba98765432100",
    "requiresLogin": false,
    "requiresSubscription": false,
    "price_plan_ids": [
      "example"
    ],
    "_id": "6543210fedcba98765432100",
    "updatedAt": "2026-11-04T12:00:00.000Z",
    "createdAt": "2026-11-04T12:00:00.000Z"
  }
]

Create a video

Creates a video. Answers 201 and re-renders the home page.

User token

Needs the token of a signed-in user.

Returns

Returns the Video object.

Status codes

201 400 401 500

POST/videos
curl -X POST 'http://bulgariandebateassociation.max-media.io/videos?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "name": "Example",
  "link": "example-item",
  "collection_id": "6543210fedcba98765432100",
  "media_id": "6543210fedcba98765432100",
  "selected": false,
  "custom_1": "example",
  "custom_2": "example",
  "custom_3": "example",
  "suitability_price_plans": [
    "6543210fedcba98765432101"
  ],
  "isSuitable": false,
  "views": [
    "6543210fedcba98765432101"
  ],
  "total_views": 0,
  "times_showed": 0,
  "owner_id": "6543210fedcba98765432100",
  "requiresLogin": false,
  "requiresSubscription": false,
  "price_plan_ids": [
    "example"
  ],
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Delete multiple videos

Deletes several videos, ids comma-separated. Answers the ids that were deleted.

User token

Needs the token of a signed-in user.

Path parameters
delete_idsstringRequired

The video's delete ids.

Returns

Returns an empty answer on success.

Status codes

200 401 500

DELETE/videos-multiple/:delete_ids
curl -X DELETE 'http://bulgariandebateassociation.max-media.io/videos-multiple/{delete_ids}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

Update multiple videos

Applies the same changes (updates) to several videos, ids comma-separated. Answers the ids that were changed.

User token

Needs the token of a signed-in user.

Path parameters
patch_idsstringRequired

The video's patch ids.

Parameters
collection_idobjectid

Collection.id.

updatesstring

The video's updates.

Returns

Returns the Video object.

Status codes

200 400 401 500

PATCH/videos-multiple/:patch_ids
curl -X PATCH 'http://bulgariandebateassociation.max-media.io/videos-multiple/{patch_ids}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "collection_id": "...", "updates": "..." }'
Response
{
  "name": "Example",
  "link": "example-item",
  "collection_id": "6543210fedcba98765432100",
  "media_id": "6543210fedcba98765432100",
  "selected": false,
  "custom_1": "example",
  "custom_2": "example",
  "custom_3": "example",
  "suitability_price_plans": [
    "6543210fedcba98765432101"
  ],
  "isSuitable": false,
  "views": [
    "6543210fedcba98765432101"
  ],
  "total_views": 0,
  "times_showed": 0,
  "owner_id": "6543210fedcba98765432100",
  "requiresLogin": false,
  "requiresSubscription": false,
  "price_plan_ids": [
    "example"
  ],
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Retrieve a video

A playlist's page with its videos. 404 when there is no such playlist. JSON with ?ionic.

Optional user

Works without a token; with a user token the answer is personal.

Path parameters
idstringRequired

The ID of the video.

Returns

Returns the Video object.

Status codes

200 404 500

GET/videos/:id
curl -X GET 'http://bulgariandebateassociation.max-media.io/videos/{id}?ionic=true'
Response
{
  "name": "Example",
  "link": "example-item",
  "collection_id": "6543210fedcba98765432100",
  "media_id": "6543210fedcba98765432100",
  "selected": false,
  "custom_1": "example",
  "custom_2": "example",
  "custom_3": "example",
  "suitability_price_plans": [
    "6543210fedcba98765432101"
  ],
  "isSuitable": false,
  "views": [
    "6543210fedcba98765432101"
  ],
  "total_views": 0,
  "times_showed": 0,
  "owner_id": "6543210fedcba98765432100",
  "requiresLogin": false,
  "requiresSubscription": false,
  "price_plan_ids": [
    "example"
  ],
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Update a video

Updates a video. Fields outside the allowed list are silently ignored. Answers the updated record, or 404.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the video.

Returns

Returns the Video object.

Status codes

200 400 401 404 500

PATCH/videos/:id
curl -X PATCH 'http://bulgariandebateassociation.max-media.io/videos/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "name": "Example",
  "link": "example-item",
  "collection_id": "6543210fedcba98765432100",
  "media_id": "6543210fedcba98765432100",
  "selected": false,
  "custom_1": "example",
  "custom_2": "example",
  "custom_3": "example",
  "suitability_price_plans": [
    "6543210fedcba98765432101"
  ],
  "isSuitable": false,
  "views": [
    "6543210fedcba98765432101"
  ],
  "total_views": 0,
  "times_showed": 0,
  "owner_id": "6543210fedcba98765432100",
  "requiresLogin": false,
  "requiresSubscription": false,
  "price_plan_ids": [
    "example"
  ],
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Delete a video

Deletes a video. Answers the deleted record, or 404. Records that point to it are not changed.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the video.

Returns

Returns an empty answer on success.

Status codes

200 401 404 500

DELETE/videos/:id
curl -X DELETE 'http://bulgariandebateassociation.max-media.io/videos/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

List all videos

The playlists page. 404 when there are no playlists.

Optional user

Works without a token; with a user token the answer is personal.

Status codes

200 404 500

GET/videos/playlists
curl -X GET 'http://bulgariandebateassociation.max-media.io/videos/playlists?ionic=true'
Response
{
  "name": "Example",
  "parent_collection": "6543210fedcba98765432100",
  "picture": "6543210fedcba98765432100",
  "about_page": "6543210fedcba98765432100",
  "match_to_option": false,
  "is_color": false,
  "color": "#3557c4",
  "position": 1,
  "items": [
    "6543210fedcba98765432101"
  ],
  "thumbnail": "6543210fedcba98765432100",
  "_id": "6543210fedcba98765432100"
}

Create a video interaction

Creates a video watch record. Records a stretch of watching (start, end); it feeds the long-video insights. Answers 201.

User token

Needs the token of a signed-in user.

Parameters
video_viewerobjectid

User.id.

Returns

Returns the VideoInteraction object.

Status codes

201 400 401 500

POST/video-interaction
curl -X POST 'http://bulgariandebateassociation.max-media.io/video-interaction?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "video_viewer": "..." }'
Response
{
  "start": 1,
  "end": 1,
  "watch_time": 1,
  "video_viewer": "6543210fedcba98765432100",
  "video_id": "6543210fedcba98765432100",
  "video_owner": "6543210fedcba98765432100",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Create an image with AI

AI: generates a picture from the owner's prompt, stores it in the media library and charges its credits. Answers { action: 'JOB', async_job } at once; the admin polls GET /async-jobs/:id, and the result arrives in the chat as a message when the job ends. The AI work is charged to the account's credits.

Admin token

Needs a site admin token.

Parameters
promptstring

What the AI should do with the image, in plain words - any language.

chatIdstring

The AI chat this request belongs to; its history and language carry over. Leave it out to start a new chat.

aiVersionstring

Which version of the AI builder to use; leave it out for the current one.

Status codes

200 401 500

POST/create-new-image
curl -X POST 'http://bulgariandebateassociation.max-media.io/create-new-image?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "prompt": "...", "chatId": "...", "aiVersion": "..." }'
Response
{
  "chat_id": "6543210fedcba98765432100",
  "role": "user",
  "text": "Text shown on the site.",
  "target_url": "example-item",
  "action": "RESPONSE",
  "options": [
    "example"
  ],
  "medias": [
    {
      "media": "6543210fedcba98765432100",
      "gcs_url": "example-item",
      "gemini_uri": "example",
      "gemini_interaction_id": "example",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "products": [
    "6543210fedcba98765432101"
  ],
  "services": [
    "6543210fedcba98765432101"
  ],
  "blogposts": [
    "6543210fedcba98765432101"
  ],
  "programs": [
    "6543210fedcba98765432101"
  ],
  "suggestions": [
    {
      "text": "Text shown on the site.",
      "route": "example",
      "item_id": "6543210fedcba98765432100",
      "medias": [],
      "picture": "6543210fedcba98765432100",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "is_system": false,
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z",
  "data": {
    "object": "example",
    "object_type": "example",
    "edit_summary": "example",
    "edit_diff": "example",
    "undo_record": "example",
    "hero_animation_offer": "example",
    "preview_state": "example",
    "pending_credit_cost": 0,
    "target_restore": "example",
    "media_request": "example",
    "item_request": "example",
    "reference_request": "example"
  }
}

Create a video with AI

AI: generates a video from text, a picture or an earlier video, as a background job. Answers { action: 'JOB', async_job } at once; the admin polls GET /async-jobs/:id, and the result arrives in the chat as a message when the job ends. The AI work is charged to the account's credits.

Admin token

Needs a site admin token.

Parameters
durationstring

The video's duration.

promptstring

What the AI should do with the video, in plain words - any language.

mediaIdsstring

The video's media ids.

chatIdstring

The AI chat this request belongs to; its history and language carry over. Leave it out to start a new chat.

aspect_ratiostring

The video's aspect ratio.

aiVersionstring

Which version of the AI builder to use; leave it out for the current one.

Status codes

200 401 500

POST/create-new-video
curl -X POST 'http://bulgariandebateassociation.max-media.io/create-new-video?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "duration": "...", "prompt": "...", "mediaIds": "...", "chatId": "...", "aspect_ratio": "..." }'
Response
{
  "chat_id": "6543210fedcba98765432100",
  "role": "user",
  "text": "Text shown on the site.",
  "target_url": "example-item",
  "action": "RESPONSE",
  "options": [
    "example"
  ],
  "medias": [
    {
      "media": "6543210fedcba98765432100",
      "gcs_url": "example-item",
      "gemini_uri": "example",
      "gemini_interaction_id": "example",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "products": [
    "6543210fedcba98765432101"
  ],
  "services": [
    "6543210fedcba98765432101"
  ],
  "blogposts": [
    "6543210fedcba98765432101"
  ],
  "programs": [
    "6543210fedcba98765432101"
  ],
  "suggestions": [
    {
      "text": "Text shown on the site.",
      "route": "example",
      "item_id": "6543210fedcba98765432100",
      "medias": [],
      "picture": "6543210fedcba98765432100",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "is_system": false,
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z",
  "data": {
    "object": "example",
    "object_type": "example",
    "edit_summary": "example",
    "edit_diff": "example",
    "undo_record": "example",
    "hero_animation_offer": "example",
    "preview_state": "example",
    "pending_credit_cost": 0,
    "target_restore": "example",
    "media_request": "example",
    "item_request": "example",
    "reference_request": "example"
  }
}

Generate an image with AI

AI: routes a request for a new picture to create-new-image. Does no AI work itself: answers { action: 'REDIRECT', target_url, response } and the chat client calls target_url next with response as the prompt.

Admin token

Needs a site admin token.

Parameters
promptstring

What the AI should do with the image, in plain words - any language.

chatIdstring

The AI chat this request belongs to; its history and language carry over. Leave it out to start a new chat.

Status codes

200 401 500

POST/generate-image
curl -X POST 'http://bulgariandebateassociation.max-media.io/generate-image?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "prompt": "...", "chatId": "..." }'

Generate an image to video with AI

AI: routes a request for a video from a picture to create-new-video. Does no AI work itself: answers { action: 'REDIRECT', target_url, response } and the chat client calls target_url next with response as the prompt.

Admin token

Needs a site admin token.

Parameters
promptstring

What the AI should do with the image to video, in plain words - any language.

aspect_ratiostring

The image to video's aspect ratio.

chatIdstring

The AI chat this request belongs to; its history and language carry over. Leave it out to start a new chat.

Status codes

200 401 500

POST/generate-image-to-video
curl -X POST 'http://bulgariandebateassociation.max-media.io/generate-image-to-video?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "prompt": "...", "aspect_ratio": "...", "chatId": "..." }'

Generate a text to video with AI

AI: routes a request for a video from text to create-new-video, if the account has credits. Does no AI work itself: answers { action: 'REDIRECT', target_url, response } and the chat client calls target_url next with response as the prompt.

Admin token

Needs a site admin token.

Parameters
promptstring

What the AI should do with the text to video, in plain words - any language.

aspect_ratiostring

The text to video's aspect ratio.

chatIdstring

The AI chat this request belongs to; its history and language carry over. Leave it out to start a new chat.

Status codes

200 401 500

POST/generate-text-to-video
curl -X POST 'http://bulgariandebateassociation.max-media.io/generate-text-to-video?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "prompt": "...", "aspect_ratio": "...", "chatId": "..." }'

Generate a video to video with AI

AI: routes a change to a video to create-new-video. Does no AI work itself: answers { action: 'REDIRECT', target_url, response } and the chat client calls target_url next with response as the prompt.

Admin token

Needs a site admin token.

Parameters
promptstring

What the AI should do with the video to video, in plain words - any language.

aspect_ratiostring

The video to video's aspect ratio.

chatIdstring

The AI chat this request belongs to; its history and language carry over. Leave it out to start a new chat.

Status codes

200 401 500

POST/generate-video-to-video
curl -X POST 'http://bulgariandebateassociation.max-media.io/generate-video-to-video?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "prompt": "...", "aspect_ratio": "...", "chatId": "..." }'

Modify an AI image with AI

AI: routes a change to a picture the AI made to update-image. Does no AI work itself: answers { action: 'REDIRECT', target_url, response } and the chat client calls target_url next with response as the prompt.

Admin token

Needs a site admin token.

Parameters
promptstring

What the AI should do with the AI image, in plain words - any language.

chatIdstring

The AI chat this request belongs to; its history and language carry over. Leave it out to start a new chat.

Status codes

200 401 500

POST/modify-ai-image
curl -X POST 'http://bulgariandebateassociation.max-media.io/modify-ai-image?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "prompt": "...", "chatId": "..." }'

Modify an AI user image with AI

AI: routes a change to a picture to update-image. Does no AI work itself: answers { action: 'REDIRECT', target_url, response } and the chat client calls target_url next with response as the prompt.

Admin token

Needs a site admin token.

Parameters
promptstring

What the AI should do with the AI user image, in plain words - any language.

chatIdstring

The AI chat this request belongs to; its history and language carry over. Leave it out to start a new chat.

Status codes

200 401 500

POST/modify-ai-user-image
curl -X POST 'http://bulgariandebateassociation.max-media.io/modify-ai-user-image?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "prompt": "...", "chatId": "..." }'

Modify a user image with AI

AI: routes a change to one of the owner's pictures to update-image. Does no AI work itself: answers { action: 'REDIRECT', target_url, response } and the chat client calls target_url next with response as the prompt.

Admin token

Needs a site admin token.

Parameters
promptstring

What the AI should do with the user image, in plain words - any language.

chatIdstring

The AI chat this request belongs to; its history and language carry over. Leave it out to start a new chat.

Status codes

200 401 500

POST/modify-user-image
curl -X POST 'http://bulgariandebateassociation.max-media.io/modify-user-image?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "prompt": "...", "chatId": "..." }'

Update an image with AI

AI: edits an existing picture as the owner asked and stores the result. Answers { action: 'JOB', async_job } at once; the admin polls GET /async-jobs/:id, and the result arrives in the chat as a message when the job ends. The AI work is charged to the account's credits.

Admin token

Needs a site admin token.

Parameters
promptstring

What the AI should do with the image, in plain words - any language.

chatIdstring

The AI chat this request belongs to; its history and language carry over. Leave it out to start a new chat.

mediaIdsstring

The image's media ids.

aiVersionstring

Which version of the AI builder to use; leave it out for the current one.

Status codes

200 401 404 500

POST/update-image
curl -X POST 'http://bulgariandebateassociation.max-media.io/update-image?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "prompt": "...", "chatId": "...", "mediaIds": "...", "aiVersion": "..." }'
Response
{
  "file": "example",
  "file_path": "example",
  "alt": "example",
  "filename": "Example",
  "filetype": "example",
  "vimeo_uri": "example",
  "vimeo_picture": "example",
  "duration": 1,
  "vimeo_url": "example-item",
  "youtube_url": "example-item",
  "youtube_picture": "example",
  "thumbnail": "example",
  "gcs_url": "example-item",
  "gcs_480_30_url": "example-item",
  "gcs_720_30_url": "example-item",
  "gcs_1080_30_url": "example-item",
  "picture_gcs_url": "example-item",
  "transcode_status": "not_started",
  "owner_id": "6543210fedcba98765432100",
  "source_url": "example-item",
  "source_framing": "example",
  "origin": "example",
  "width": 1,
  "height": 1,
  "sequence": {
    "status": "example",
    "started_at": "example",
    "updated_at": "example",
    "step": "example",
    "done": 0,
    "total": 0,
    "ext": "example",
    "trim_start": 0,
    "trim_end": 0,
    "build_id": "example",
    "previous_base": "example",
    "frame_count": 0
  }
}
↑↓ Navigate↵ GoEsc Close