Quickreels Docs

API Reference

This section provides detailed information about the QuickReels AI API endpoints, including request parameters, response structures, and example usage.

Authentication

All API requests must include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Video Endpoints

Create a Video

Creates a new video using the specified parameters.

Endpoint: POST /videos/api

Request Body:

{
	"topic": string,
	"backgroundStyle": string,
	"narrationVoiceId": string,
	"language": string,
	"duration": "30" | "60",
	"custom": string (optional)
}

Example Request:

const axios = require("axios");
const apiKey = "YOUR_API_KEY";
const baseUrl = "https://api.quickreels.ai/v1";
 
axios
	.post(
		`${baseUrl}/videos/api`,
		{
			topic: "Machine Learning Breakthroughs",
			backgroundStyle: "flux",
			narrationVoiceId: "nova",
			language: "en",
			duration: "60",
		},
		{
			headers: {
				Authorization: `Bearer ${apiKey}`,
				"Content-Type": "application/json",
			},
		}
	)
	.then((response) => {
		console.log("Video creation initiated:", response.data);
	})
	.catch((error) => {
		console.error("Error creating video:", error.response.data);
	});

Response:

{
	"id": "video-uuid",
	"status": "completed",
	"progress": 100,
	"videoUrl": "https://storage.quickreels.io/videos/video-uuid.mp4",
	"createdAt": "2023-06-15T10:30:00Z"
}

The status field can be one of the following values:

  • processing: The video is being generated
  • completed: The video has been successfully created
  • failed: There was an error during video creation

Check Video Status

Retrieves the current status of a video as it is being generated.

Endpoint: GET /videos/api/{id}/status

Authentication: API Key required

Parameters:

  • id (path parameter): The UUID of the video

Example Request:

const axios = require("axios");
const apiKey = "YOUR_API_KEY";
const baseUrl = "https://api.quickreels.ai/v1";
const videoId = "video-uuid";
 
axios
	.get(`${baseUrl}/videos/api/${videoId}/status`, {
		headers: {
			Authorization: `Bearer ${apiKey}`,
		},
	})
	.then((response) => {
		console.log("Video status:", response.data);
	})
	.catch((error) => {
		console.error("Error checking video status:", error.response.data);
	});

Successful Response:

{
	"id": "video-uuid",
	"title": "Your Video Title",
	"caption": "Your Video Caption",
	"script": "Your Video Script",
	"videoUrl": "https://storage.quickreels.ai/videos/video-uuid.mp4",
	"status": "completed",
	"progress": 100,
	"createdAt": "2023-06-15T10:30:00Z",
	"updatedAt": "2023-06-15T10:35:00Z"
}

The status field can be one of the following values:

  • processing: The video is being generated
  • completed: The video has been successfully created
  • delivered: The video has been delivered (if applicable)
  • failed: There was an error during video creation

Error Handling

The API uses conventional HTTP response codes to indicate the success or failure of requests. Codes in the 2xx range indicate success, codes in the 4xx range indicate an error that resulted from the provided information (e.g., a required parameter was missing), and codes in the 5xx range indicate an error with our servers.

In case of an error, the response body will contain more information about the error:

{
	"statusCode": 400,
	"message": "Invalid request parameters",
	"error": "Bad Request"
}

Rate Limiting

The API is subject to rate limiting to ensure fair usage across all users. The current limits are:

  • 10 requests per minute
  • 1000 requests per day

If you exceed these limits, you'll receive a 429 Too Many Requests response. The response will include a Retry-After header indicating how long to wait before making another request.

For any questions or concerns about API usage, please contact our support team.

On this page