---
title: "Upload Audio"
method: POST
path: "/v2/audios"
tags: ["Audio Emotion API"]
---

# Upload Audio

`POST /v2/audios`

Analyze emotions and speech patterns from audio content.

Submit audio from multiple sources and receive detailed emotion analysis,
speaker identification, and transcription with emotional insights.

**Input Sources:**
- **YouTube**: Provide any YouTube video URL (audio will be extracted)
- **Instagram**: Instagram Reels and video posts (public content)
- **Twitter/X**: Twitter video posts and media content
- **Facebook**: Facebook video posts (public content)
- **Cloud Storage**: Dropbox, Google Drive, or other cloud service links
- **Direct URL**: Any publicly accessible audio or video link
- **File Upload**: Upload audio files directly from your device

**Audio Extraction:**
Video files are supported for URLs only (YouTube, Instagram, Twitter, Facebook,
Dropbox, direct links) - the audio track will be automatically extracted and analyzed.
For file uploads, use audio formats only (MP3, WAV, AAC, M4A).

**Analyze Specific Segments:**
Focus on specific portions using `start_millis` and `end_millis` parameters.
This helps target key moments and optimize credit usage.

**How It Works:**
1. Submit your audio and receive an immediate response with an audio ID
2. Audio is queued for processing (typically completes within minutes)
3. Optionally receive a webhook notification via `callback_url` when complete
4. Retrieve results using the audio ID

**Supported Formats:**
- File Upload: MP3, WAV, AAC, M4A
- Media URLs: MP3, WAV, AAC, M4A, MP4, AVI, MOV (audio extracted from video URLs)

**Credit Usage:**
Processing is billed at a **base** rate of 0.5 credits per second of analyzed
audio duration (Professional and Enterprise plans: 0.25 credits per second).
This base rate is **discounted** when speech-analysis stages are disabled —
turning off `transcription`, `diarization`, and/or `text_emotion`
lowers the per-second rate (skipping all three halves the speech cost). The
discounted rate is applied before the credit is computed on the floored
duration (rounded to whole seconds).

**Extra Parameters:**
- **diarization** (bool): Enable or disable speaker diarization for identifying different speakers in the audio. Default is True. Disabling it reduces the per-second credit cost.
- **text_emotion** (bool): Enable or disable transcript emotion analysis for the transcribed text. Default is True. Requires `transcription=True`; if `transcription` is False this is forced off. Disabling it reduces the per-second credit cost. Supplying a `transcript` is the exception: the words already exist, so `text_emotion` is honoured as you sent it.
- **transcription** (bool): Enable or disable transcript / ASR generation. Default is True. When False, no transcript is produced and `text_emotion` is forced off. Disabling it reduces the per-second credit cost.
- **language** (str, optional): Language code for the audio (e.g., 'en'). If not provided, language will be auto-detected.

**Bringing your own transcript:**
Pass `transcript` (and optionally `transcript_format`) to skip our speech-to-text
entirely. Your speaker turns become the diarization and your speaker names are used
verbatim, so the analysis comes back attributed to real participants rather than
"Speaker 1" / "Speaker 2" — and you are not billed for the transcription stage.
A `start_millis`/`end_millis` trim is rejected: we would not have media your
timestamps line up with. A `media_url` source is accepted — the download runs
first and your transcript is applied once processing completes; that
response's `status` is `queue`. After that apply we deliver `callback_url`
(success or failure). A file or presigned upload applies in the same
request and reports `processing`. The response reports `speaker_count` so you
can see how many speakers we read out of what you sent.

## Response `200`

Successful Response

- AudioEmotionResponseV2 — V2 response model for audio emotion detection with URL source tracking. Supports: - YouTube URLs (audio extracted from video) - Cloud storage URLs (Dropbox, direct URLs, etc.) - Time parameters for all URL types - URL source tracking with media type detection Attributes: id (str): Unique ID of the audio. title (str): Title of the audio. status (str): Processing status (queue, processing, done, etc.). duration (int): Duration in seconds (trimmed duration if time params provided). media_source (str): Source type ("youtube", "dropbox", "public_url", "file_upload"). media_source_url (str): Full URL as provided by user. media_source_type (str): Type of source media ("video" or "audio"). user_id (str): ID of the user who uploaded the audio. created_at (Optional[str]): Timestamp when audio was created.
  - `id` string, required
  - `title` string, required
  - `status` string, required
  - `duration` integer, required
  - `media_source` string, required
  - `media_source_url` string, required
  - `media_source_type` string, required
  - `user_id` string, required
  - `created_at` string, nullable
  - `diarization` boolean, nullable
  - `text_emotion` boolean, nullable
  - `transcription` boolean, nullable
  - `speaker_count` integer, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/imentiv/apis/welcome-to-imentiv-ai.md) · [All operations](https://skmtc.net/imentiv/apis/welcome-to-imentiv-ai/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/imentiv/welcome-to-imentiv-ai/revisions/350e9cbcb623/schema)
