YRS LAB API
Make videos from your own app, website or workflow. The same videos, voices and prices as this site.
Your API keys
Sign in to create a key No account? Sign up free.
How it works
- Buy points on the Pricing page. API videos use bought points only, at the same price as this site (50 points for a standard video, plus any extras you choose).
- Create a key above and send it with every request:
Authorization: Bearer YOUR_KEY - Start a video, check its progress every 15 to 30 seconds, then download it when it is ready.
Address of every request: https://yrslab.com/api/v1. Requests and answers are JSON.
Requests
| Request | What it does |
|---|---|
POST /videos | Start a video. Answers with the video's id and status. |
GET /videos | Your videos, newest first. |
GET /videos/{id} | One video: status, progress_percent, and whether it is ready. |
GET /videos/{id}/file | Download the finished MP4 video. |
POST /videos/{id}/cancel | Stop a video that has not finished. Its points come back. |
GET /voices | Languages and voices you can choose. |
GET /points | Your bought points and the price of one video. |
Start a video
curl https://yrslab.com/api/v1/videos \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"title": "How rainbows form",
"raw_information": "Why we see a rainbow after rain",
"language": "english",
"duration_mode": "auto"}'
| Field | Meaning |
|---|---|
raw_information | Required. A topic, or your own text (up to 30,000 characters). |
title | Optional. Up to 200 characters. |
language | For example english. See GET /voices. |
voice | Optional. A voice from GET /voices. |
duration_mode | auto, or manual with max_duration_sec from 60 to 600. |
quality | l, m (default) or h. |
target_audience, scope | Optional. Who it is for, and what to cover (200 characters each). |
Limits and answers
- Up to 60 requests a minute for each account (all its keys together), 2 videos in progress and 20 new videos a day for each account.
- When we are busy, website customers go first: an API video may be asked to wait and try again a few minutes later.
401the key is missing or not valid.402not enough bought points.422a setting is not valid.429too many requests or busy: wait and try again (see theRetry-Afterheader).503our video service is resting: try again later.- Every answer with a problem has a
detailsentence you can show to your users.
Using the API means you agree to our Terms, including the API rules. Questions? Contact us.