PopVid
PopVid
API Platform
Version 1.0.0
All Systems Operational

API Documentation

Learn how to integrate our API

PopVid API Documentation

Learn how to use our API to generate animated videos.

Need help? Contact us atsupport@popvid.ai

Authentication

The PopVid API uses an API key to authenticate requests. You must include an api-key header in all of your requests with your key provided as a Bearer token.

Example Header: X-API-Key: Bearer YOUR_API_KEY

Endpoints

Video Generation

POST/api/v1/gen_video

This endpoint initiates the asynchronous generation of a video. You provide an image and a prompt, and you'll get back a request ID to track the status.

💡 Note: Each video generation consumes 30 credits and produces a 4-5 second video.

Request Body

FieldTypeDescriptionRequired
imagestringThe URL of the source image or the base64 of the source image.Yes
promptstringA text prompt describing the desired animation (max 1000 characters).Yes

Response

The API will respond with the request ID, which you can use to check the generation status.

Get Generation Status

GET/api/v1/gen_video/{id}

Retrieves the status of a video generation request using the request ID.

Path Parameters

ParameterTypeDescription
idstringThe requestId returned from the generate endpoint.

Response

The status field will indicate the current state of the generation process.

When processing:

The response will indicate the request is being processed.

When completed:

The response will include an outputUrl with a link to the generated video.

Example Request of Image URL

curl -X POST "https://api.popvid.ai/api/v1/gen_video" \
-H "X-API-Key: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"image\":\"https://picsum.photos/200/300\",\"prompt\":\"add a monkey in the picture, the monkey smile to you\"}"

Example Request of Image Base64

curl -X POST "https://api.popvid.ai/api/v1/gen_video" \
-H "X-API-Key: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"image\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg==\",\"prompt\":\"add a monkey in the picture, the monkey smile to you\"}"

Example Response

{
  "requestId":"2774489d-103a-4353-a0b2-8d7ba5ca8642"
}

Example Request

curl -X GET "https://api.popvid.ai/api/v1/gen_video/YOUR_REQUEST_ID" \
-H "Content-Type: application/json" \
-H "X-API-Key: Bearer YOUR_API_KEY"

Processing Response

{
    "requestId": "YOUR_REQUEST_ID",
    "status": "processing"
}

Completed Response

{
    "requestId": "YOUR_REQUEST_ID",
    "status": "completed",
    "outputUrl": ""
}

Possible Statuses

  • scheduled

    The request has been received and is waiting to be processed.

  • processing

    The video is currently being generated.

  • completed

    The video has been successfully generated.

  • failed

    An error occurred during generation.