|Docs

API reference

This page is a route-level reference for the Sume Public API. It is designed to be readable in the docs shell while keeping the OpenAPI schema as the exact source of truth.

OpenAPI schema

Preview schema:

Production schema:

Download it:

Authentication

All Public API v1 endpoints use workspace-scoped API keys.

The legacy X-Api-Key header is accepted for existing keys, but Authorization: Bearer is preferred. Sume resolves workspace and owner scope from the key, so request bodies should not include workspace_id or user_id.

Account and credits

MethodPathReturnsNotes
GET/meaccountAuthenticated user, workspace, and API key metadata.
GET/creditscreditsPlan, monthly and bonus credits, remaining credits, and active generation capacity.

Brand DNA

MethodPathReturnsNotes
GET/brandbrand listLists sanitized Brand DNA profiles visible to the workspace.
GET/brand/currentbrandReturns the current server-selected workspace Brand DNA profile.

Brand responses can include images[].reference_url values. Use those URLs as reference_image_urls for image generation when present.

Avatars

MethodPathReturnsNotes
GET/avatarsavatar listPublic and workspace avatars usable by the key.
GET/avatars/{avatarId}avatarOne avatar with media and capability metadata.

Avatar capabilities indicate whether the avatar can be used for talking-head video, UGC ad video, or Face Swap workflows.

Jobs

MethodPathReturnsNotes
GET/jobsjob listSupports limit, cursor, type, and status.
GET/jobs/{jobId}jobCurrent status and sanitized error/result URL fields.
GET/jobs/{jobId}/resultjob with resultFinal output payload for completed jobs when available.

Job objects expose public status and output fields only. Internal provider payloads are not part of the public contract.

Image generation

MethodPathReturnsCredits
POST/images/generationsimage_generationMay reserve or spend credits.

Common request fields include:

FieldTypeNotes
promptstringMain image instruction.
aspect_ratiostringOutput aspect ratio.
resolutionstringOutput size preference when supported.
qualitystringQuality preference when supported.
image_count or nintegerMinimum 1; current CLI guidance recommends one reliable output per job.
reference_image_urlsstring arrayHTTPS image references, including Brand reference_url values when available.

Video generation

MethodPathReturnsCredits
POST/videos/generationsvideo_generationMay reserve or spend credits.

Common request fields include:

FieldTypeNotes
promptstringMain video instruction.
aspect_ratiostringFor example 9:16.
durationnumberRequested duration in seconds.
generate_audiobooleanWhether to request audio when supported.
resolutionstringOutput resolution preference.

AI Ads video

MethodPathReturnsCredits
POST/ads/videosad_video_generationReserves credits before accepting the job.

Required field:

FieldTypeNotes
scriptstringRequired, 3 to 1800 characters.

Selected optional fields:

FieldTypeNotes
ad_formatenumtalking_heads, ugc_ads, or video; defaults to talking_heads.
avatar_id or avatar_slugstringRequired for avatar-based ad formats.
localeenumen or ko.
duration_secondsnumberSume may clamp to supported durations by ad format.
reference_image_urlsstring arrayUp to 9 HTTPS image references.
reference_video_urlsstring arrayOnly supported for ad_format: "video".

Face Swap

MethodPathReturnsCredits
POST/face-swapface_swapReserves credits per avatar/job.

Face Swap requires a Sume media URL created with upload purpose face_swap_source_video.

FieldTypeNotes
source_video_urlURISume media URL returned by the upload flow.
avatar_idsstring array1 to 5 avatar ids.
duration_secondsnumberMaximum 15 seconds.
trim_start_secondsnumberOptional trim start.
trim_end_secondsnumber or nullOptional trim end.
aspect_ratioenum16:9, 9:16, 1:1, 4:3, 3:4, or 21:9.

Reference Analysis

MethodPathReturnsCredits
POST/reference-analysisreference_analysisRequires credits and creates an async analysis job.

Supported input is a public TikTok or Instagram Reel URL. Poll the returned job id, then fetch the result from /jobs/{jobId}/result.

Uploads and Asset Library

MethodPathReturnsNotes
POST/uploads/presignuploadCreates a temporary signed upload URL.
POST/assetsasset_uploadFinalizes an uploaded video and starts Asset Library processing.
GET/assetsasset listLists or searches indexed scene assets.
GET/assets/{assetId}assetReads one scene asset.

Upload purposes:

PurposeUse for
asset_library_videoVideos that should be ingested into Asset Library scene search.
face_swap_source_videoSource videos used by Face Swap.

The upload response includes a temporary upload_url, an object_key, media_url, and required_headers. Treat them as sensitive operational values. Do not send the Sume API Authorization header to the storage upload URL.

Finalize Asset Library upload:

Search indexed scenes:

Asset results include a scene-level media_url when available, optional thumbnail/source video fields, source type, search score, and scene metadata.

List response

List endpoints use this envelope:

Use limit to control page size and cursor to continue from next_cursor.

Error response

Common status codes include:

StatusMeaning
400Invalid request body, unsupported input, or validation error.
401Missing or invalid API key.
402Insufficient credits.
403API key lacks access to the requested resource or action.
404Resource not found in the current workspace scope.
409Conflict, duplicate, or incompatible state.
413Uploaded/requested media is too large.
429Rate limit or active generation limit.
500, 502, 503Internal, upstream, or provider availability failure.

When reporting an issue to Sume, include request_id and the sanitized endpoint or job id. Do not include API keys, signed URLs, object keys, private media URLs, full provider payloads, user emails, or workspace/user ids.