PhotoGPT Developers
API ReferenceGeneration

Generate videos

POST
/videos/generation

Triggers an asynchronous video generation job. The response returns a jobId; poll GET /jobs/{id} for status and outputs.

Authorization

BearerAuth
AuthorizationBearer <token>

Developer API key. Send as Authorization: Bearer <api_key>.

In: header

Request Body

application/json

Video generation request. Choose the schema matching modelID.

TypeScript Definitions

Use the request body type in TypeScript.

Generate videos with veo-3.1 or veo-3.1-fast.

elementIDs?array<string>
modelID*string
numVideos?integer
options?

Options for this model family. Send only the option group matching modelID.

prompt*string
referenceImages?array<>

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/videos/generation" \  -H "Content-Type: application/json" \  -d '{    "modelID": "grok-imagine-1.5",    "numVideos": 1,    "options": {      "grok": {        "aspectRatio": "16:9",        "duration": 8,        "resolution": "720p"      }    },    "prompt": "Fast-paced cinematic shot of a retro robot skating through Tokyo"  }'
{  "result": {    "jobId": "job_123",    "status": "queued"  },  "status": "OK"}
{  "err": "string",  "message": "string",  "result": null,  "status": "NOK"}
{  "err": "string",  "message": "string",  "result": null,  "status": "NOK"}
{  "err": "string",  "message": "string",  "result": null,  "status": "NOK"}
{  "err": "string",  "message": "string",  "result": null,  "status": "NOK"}