Jarvis, The Storykit API
 1.0 
OAS 3.0

Getting started

Get your access token

Before you can make requests to the API, you need to get an access token.

To get the access token you make the following request:

curl --request POST \
  --url https://storykit-dev.eu.auth0.com/oauth/token \
  --header 'Content-Type: application/json' \
  --data '{
    "audience": "https://jarvis.storykit.io",
    "grant_type": "client_credentials",
    "client_id": "your-client-id",
    "client_secret": "your-client-secret"
}'

You receive the client ID and the client secret from your Storykit contact person.

Note: The access token expires after 24 hours and after that you need to retrieve a new one.

Using the access token

In subsequent requests to the API. You authorize the requests by sending the access token as part of the Authorization header, like so:

Authorization: Bearer your-access-token

Creating a video

Use the POST /v1/videos endpoint to create a video. Videos can be created by directly inputting text or using a URL as the source:

  • if text is used, note that texts shorter than {minTextLength} of the chosen creator might produce low quality scripts. The {minTextLength} for each creator can be found through the GET /v1/creators endpoint.

  • if a URL is used, note that scraped URLs with text longer than 200,000 characters will be shortened.

To get possible values for theme, promptId, outputLanguage, and sourceLanguage, you can use the corresponding endpoints (e.g. GET /v1/themes).

Creating a video takes ~1 min. To check the status of the creation and get the final results you use the GET /v1/videos/:id endpoint. You receive the video ID as a result from the previous POST request.

Error Details

Some errors (e.g bad requests and not-found errors), may come with error codes. Each error code has a corresponding description. You can see this mapping in the table below:

Error CodeDescription
1Value must be a string.
2Value length must be between 1 - 200,000 characters.
3Value must not be a URL.
4Value must be a valid URL.
5Value must include either URL or text, but not both.
6Value must be a 24-character hexadecimal (0-9, a-f) identifier.
7Value must be one of the following values: square landscape portrait 4:5 coffee.
8Value must not be an empty string ("").
9Video not found.
10Client not found.
11Value must include a quote
12Clients not found.
13Value length must be between 1-320 characters.
14Theme not found.
15Prompt not found.
16Source language not found.
17Output language not found.
18Value must not have more than 10 items.
19Value's extension must be one of the following: .jpg .png .jpeg .webp.
20Unable to upload one of the asset URLs. Please verify that the URL is valid and open to the public.

Endpoints