Skip to main content
POST
cURL

Documentation by X-Pilot

This request starts work that may consume workspace credits. Check credits and capacity before sending it.
Required scope: video_agents:write. A stable Idempotency-Key is required for exact retries. Manage API keys · Authentication and recovery
An application sends a scoped API key to the X-Pilot REST API and receives an HTTP status and JSON response.
REST requests use a scoped API key. Keys, credits and usage are managed in the App console.

Authorizations

Authorization
string
header
required

Scoped X-Pilot API key

Headers

Idempotency-Key
string
required

Stable key for exact retries only. Use a different key for a different operation or input.

Required string length: 8 - 128

Body

application/json
prompt
string
required

The brief: audience and goal first, then a # title and ## sections with concrete facts, numbers, formulas, dates or ordered steps. Each ## section becomes roughly one scene; keep one video to about 12 scenes. Do not name visual components. Up to 20,000 characters.

Maximum string length: 20000
Example:

"Create a short English lesson about solar energy."

require_outline_confirmation
boolean
default:false

Default false: generate straight through with no pause. true: the first message pauses with status=paused, next_action=confirm_outline and an outline summary; then send outline_action=confirm (no prompt needed) or outline_action=revise with a prompt.

Example:

false

video_config
object

Video settings applied at creation; they cannot be changed by a follow-up message. Unknown fields or unsupported values return 400 invalid_parameter with param and allowed.

Example:
files
object[]

Up to 5 attachments. Each item uses either an owned asset_id or a caller-supplied public http(s) URL. Third-party URLs are downloaded and archived to the caller's storage before use. Item fields: asset_id or url (required), name (optional, ≤255), type (optional: document, image, video; inferred when omitted), and files_role (optional: primary or reference).

Example:
callback_url
string

Optional webhook for this message only. Public HTTPS (port 443) up to 2,048 characters; private, loopback and http addresses return 400 invalid_webhook_url / unsafe_webhook_url. When the message reaches completed, paused, failed or stopped, X Pilot POSTs a video-agent. event signed with the workspace callback secret (Developer console → Webhooks). Deliveries retry up to 6 times and are listed in the console.

Maximum string length: 2048
Example:

"https://your-domain.com/xpilot/callback"

callback_id
string

Optional reference echoed back as data.callback_id in the callback, such as your order ID. Letters, digits, _ . : - up to 128 characters. Requires callback_url.

Maximum string length: 128
Pattern: ^[\w.:-]{1,128}$
Example:

"order-1024"

Response

Success