API Reference 2.0

Generate text with AI

All text is generated by AI and there might be mistakes.

The txt output is only available in private beta since API version: 2023-101

Examples

Get a title, a summary and hashtags from a video or audio file:

{
  "outputs": {
    "txt": {
      "fields": ["title", "summary", "hashtags"],
      "lang": "English"
    }
  }
}

You can also create multiple txt outputs for multilingual text:

{
  "outputs": {
    "txt": [
      {
        "key": "txt-en",
        "fields": ["title", "summary", "hashtags"],
        "lang": "English"
      },
      {
        "key": "txt-fr",
        "fields": ["title", "summary", "hashtags"],
        "lang": "French"
      }
	  ]
	}
}

Note the texts might be different.

Parameters

NameTypeDefaultRequired
fields
The text fields you want to generate.
Supported fields are: transcript title summary short_description long_description key_points category hashtags
array Yes
lang
Will return all text translated in the given language.
Supported languages are: English Spanish French Portuguese Italian German Dutch Norwegian Swedish Danish Finnish Polish Russian Turkish Simplified Chinese Traditional Chinese Japanese Korean Arabic Hebrew Hindi
string Yes
if
If the given condition is false, the output won't be processed.
Logical operators we support are: < > <= >= <> != = AND OR NOT. See Conditional outputs.
string No
key
Will rename the output key which is sent in the notification payload. Very useful because you can change the output settings but the key name you get at the end will be unchanged. No code to update on your side.
string No

Notifications

Instead of receiving an output URL, the fields containing text will be delivered in JSON format within the notification payload, and you can access the result there.

{
  "job_id": "iJQwae4MjVAVxx",
  "event": "job.completed",
  "metadata": false,
  "data": {
    "type": "job",
    "status": "job.completed",
    "progress": "100%",
    "id": "iJQwae4MjVAVxx",
    "created_at": "2023-04-06 13:40:07 +0000",
    "completed_at": "2023-04-06 13:42:43 +0000",
    "input": {
      "status": "input.transferred"
    },
    "outputs": [
      {
        "key": "txt-fr",
        "type": "text",
        "format": "txt",
        "status": "text.processed",
        "fields": {
          "title": "Le secret des traders Forex rentables",
          "summary": "Découvrez l'erreur courante qui empêche les traders Forex de gagner de l'argent. Apprenez comment structurer un système de trading pour créer la confiance et la maîtrise nécessaires pour générer des revenus en utilisant vos compétences en trading.",
          "category": "Éducation financière",
          "key_points": [
            "Créer un système de trading structuré pour générer des revenus sur le Forex",
            "Comprendre les composantes clés du système de trading : direction du marché, objectifs, risk management, suivi de données et psychologie",
            "Appliquer le système pendant 3 mois sans modification pour acquérir confiance et maîtrise",
            "Ne pas constamment modifier le système pour éviter de perturber la confiance et la maîtrise acquises",
            "Générer des revenus pour fructifier les capitaux avec les intérêts composés"
          ]
        }
      }
    ]
  }
}

If we got no text from the video, all the fields will be left blank.

Here are the field types:

FieldType
transcript string
title string
short_description string
long_description string
summary string
category string
hashtags array
key_points array

Getting access to the private beta

If you want to test this new feature currently in private beta, please contact us. We need your feedback!