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

  1. 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).
  2. Create a key above and send it with every request: Authorization: Bearer YOUR_KEY
  3. 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

RequestWhat it does
POST /videosStart a video. Answers with the video's id and status.
GET /videosYour videos, newest first.
GET /videos/{id}One video: status, progress_percent, and whether it is ready.
GET /videos/{id}/fileDownload the finished MP4 video.
POST /videos/{id}/cancelStop a video that has not finished. Its points come back.
GET /voicesLanguages and voices you can choose.
GET /pointsYour 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"}'
FieldMeaning
raw_informationRequired. A topic, or your own text (up to 30,000 characters).
titleOptional. Up to 200 characters.
languageFor example english. See GET /voices.
voiceOptional. A voice from GET /voices.
duration_modeauto, or manual with max_duration_sec from 60 to 600.
qualityl, m (default) or h.
target_audience, scopeOptional. 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.
  • 401 the key is missing or not valid. 402 not enough bought points. 422 a setting is not valid. 429 too many requests or busy: wait and try again (see the Retry-After header). 503 our video service is resting: try again later.
  • Every answer with a problem has a detail sentence you can show to your users.

Using the API means you agree to our Terms, including the API rules. Questions? Contact us.