v1

latestOpenAPI 3.1.02026-07-1381127211.1 KB
Text Emotion API

Upload Text

Analyze emotions and sentiment from text content.

Submit text directly, provide a cloud storage URL, or upload a text file (.txt, .srt, .pdf).

Input Modes (provide exactly one):

  • text: Raw text content for direct analysis
  • text_url: URL to a text file from Dropbox, Google Drive, AWS S3, or any public URL
  • text_file: Direct file upload (.txt, .srt, .pdf)

How It Works:

  1. Submit your text (or file URL / file upload) and receive an immediate response with a text ID
  2. For file URLs/uploads: the file is downloaded/read, text extracted, and word count calculated
  3. Text is queued for processing (typically completes within seconds)
  4. Optionally receive a webhook notification via callback_url when complete
  5. Retrieve results using the text ID

Supported File Formats (for text_url and text_file):

  • .txt — Plain text files
  • .srt — Subtitle files (timestamps are stripped, only text is extracted)
  • .pdf — PDF documents (text extracted from all pages)

Credit Usage: Processing is billed at 2 credits per 100 words. Professional and Enterprise plans: 1 credit per 100 words.

post/v2/texts

Response

Successful Response

idstring required
titlestring required
statusstring required
word_countinteger required
user_idstring required
created_atstring nullable
media_sourcestring nullable
media_source_urlstring nullable