Skip to content

API

Set clip options in an API request

Every field a Snipri API job request takes: the source, the spoken language, the name and the webhook, then each clip setting from the genre to captions.

On this page

A job request carries the choices the Studio offers before a job: the kind of video, how long the clips run, the moments to look for, the part of the video to use and the caption style. Every field but the source can be left out, and a field left out takes the default the Studio starts on.

The request

#
FieldWhat it takes
source.urlA link to the video, as the Studio takes one. Send this or source.upload, not both.
source.upload.sizeBytesThe file's size in bytes. Needed for an upload.
source.upload.durationSecThe video's length in seconds. Needed with clip.range. Without it, the job holds the videos your plan's longest video would count, or what is left if that is fewer, until it ends; it is counted by the length Snipri measures.
source.upload.fileNameThe file's name, which names the job when name is not sent.
languageThe spoken language, as one of 25 codes: en (English), de (German), es (Spanish), fr (French), pt (Portuguese), it (Italian), nl (Dutch), ru (Russian), pl (Polish), id (Indonesian), uk (Ukrainian), sv (Swedish), tr (Turkish), no (Norwegian), hr (Croatian), ro (Romanian), sk (Slovak), el (Greek), da (Danish), fi (Finnish), hu (Hungarian), cs (Czech), ja (Japanese), ko (Korean), vi (Vietnamese). Or auto, the default, to detect it.
nameThe job's name in My clips. Left out, it comes from the link or the file.
webhookUrlWhere this job's webhook goes, in place of the account's endpoint.
clipHow the video is clipped, in the fields below. Left out, every setting is on its default, as in the Studio.

Clip settings

#

The settings sit in clip, as they sit in the Studio's panel before a job.

FieldWhat it takes
clip.modeai, the default, picks the best moments. whole keeps the video, or the part in clip.range, as one clip of up to 10 minutes; genre, length and moments are not used with it.
clip.genreWhat kind of video it is: auto, qa, commentary, marketing, webinar, motivational, podcast, academic, listicle, product-review, how-to, comedy, sports, sermon, news, vlog, gaming. auto, the default, lets Snipri tell from what is said.
clip.lengthHow long each clip runs: auto, 15 to 60s; short, 10 to 30s; medium, 30 to 60s; long, 60 to 90s; extended, 90s to 3 min. auto is the default.
clip.momentsThe moments to look for, in a sentence of up to 300 characters. Only with ai.
clip.rangeThe part of the video to clip, as from and to in seconds, at least 10 seconds apart. Uploads only, with source.upload.durationSec. Only that part counts toward your plan.
clip.captionsnone, for no captions, or a caption style: karaoke, panel, typewriter, bounce, spotlight, pop, impact, comic, focus, clean, editorial, bulletin, kapow, slate, poster, signal, ticker, orchid, badge, sprout, sorbet, flamingo, daydream, gilded, bloom, sunset, pogo, decode, feather, lucid, ribbon. Left out, the clips start in the look your Brand screen sets.
clip.headlinetrue or false, to show or hide the hook title on every clip. Left out, your Brand look decides.

Choose clip settings explains what each setting changes, Choose the spoken language when to name the language rather than leave it on auto, and Change caption style shows the styles.

An example

#

This request keeps part of an uploaded episode, names its language and the moments to look for, and sets a caption style:

Request
curl -X POST https://www.snipri.com/api/v1/jobs \
  -H "Authorization: Bearer $SNIPRI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "source": {
      "upload": {
        "sizeBytes": 734003200,
        "durationSec": 3542.5,
        "fileName": "episode-12.mp4"
      }
    },
    "language": "en",
    "name": "Episode 12",
    "clip": {
      "genre": "podcast",
      "length": "medium",
      "moments": "The story about the first customer, and the advice at the end",
      "range": {
        "from": 120,
        "to": 2400
      },
      "captions": "karaoke",
      "headline": true
    }
  }'

Only the part in clip.range counts toward your plan, so clipping part of a long recording counts the hours of that part alone. How videos are counted has the whole rule.

When a setting is refused

#

A setting that cannot be used is refused with INVALID_REQUEST, and its message is the sentence the Studio shows for the same choice. Nothing is made, held or counted for a refused request, so correct the field and send it again.