---
title: "Upload an audio clip to an evaluator"
method: POST
path: "/test_framework/v2/scenarios/{id}/condition-audio/"
tags: ["test_framework"]
---

# Upload an audio clip to an evaluator

`POST /test_framework/v2/scenarios/{id}/condition-audio/`

## Request

- Base URL: `https://api.cekura.ai`
- URL: `https://api.cekura.ai/test_framework/v2/scenarios/{id}/condition-audio/`
- Auth: one of:
  - API key in header `X-CEKURA-API-KEY`
  - HTTP bearer
  - HTTP bearer

Add an audio clip to this scenario. The clip is transcoded to 24kHz mono PCM WAV, stored, and transcribed asynchronously. Give it a `name` to reference it as `<audio id="name"/>` from any number of verbatim steps; omit it and a readable name is derived from the filename, the same convention the editor uses. Pass `condition_id` to also insert that tag into one condition, with `action_template` choosing the insertion point. Send the file as `multipart/form-data`, or as `application/json` with `file_name` and base64 `content_base64`.

## Path parameters

- `id` integer, required

## Request body

- object
  - `file_name` string, required: Filename including its extension: wav, mp3, m4a, ogg, webm or flac.
  - `content_base64` string, byte, required: Base64-encoded audio, max 25 MB decoded. Accepts a raw base64 string or a `data:<mime>;base64,...` data URI.
  - `name` string
  - `condition_id` integer
  - `action_template` string
  - `replace_audio_id` string

## Response `202`

- ConditionAudioEntry: Read serializer for one Scenario.condition_audio entry (a plain dict). The caller passes each entry dict with `audio_id` injected; fields are tolerant of missing keys. `previous_action` is intentionally not exposed (internal undo state for a clip that replaced a whole action).
  - `audio_id` string, nullable
  - `action` string, nullable
  - `condition_id` string: First condition referencing this clip, or null when no action references it. Kept for compatibility - prefer condition_ids.
  - `condition_ids` integer[]: Every condition referencing this clip, in authored order. Empty when the clip is uploaded but not referenced by any action yet.
  - `steps` string: Every step referencing this clip, as paths into the conditional actions (e.g. `first_message`, `conditions[1].then[0]`).
  - `tag` string: The reference to paste into an action, e.g. <audio id="greeting"/>
  - `status` string, nullable
  - `transcript` string, nullable
  - `words` ConditionAudioWord[]: The transcript's words with the time each is spoken in the clip. Absent until the clip has been transcribed.
    - `word` string, required
    - `start` number, double, required: Seconds from the start of the clip.
    - `end` number, double, required: Seconds from the start of the clip.
  - `duration` number, double, nullable
  - `filename` string, nullable
  - `timing_source` string, nullable: Where the word timings came from: `deepgram` (measured), `interpolated` (spread evenly), or `manual` (sent with a transcript edit).
  - `error` string, nullable
  - `updated_at` string, nullable
  - `playback_url` string: S3 URL of the recorded audio clip

## Other responses

- `400`
- `409`

## Changes

- **2026-11-03** `a6fb6a739212`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/cekura/apis/cekura-api/changes/test_framework/v2/scenarios/:id/condition-audio/post.md)

---

[API](https://skmtc.dev/cekura/apis/cekura-api.md) - [All operations](https://skmtc.dev/cekura/apis/cekura-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cekura/apis/cekura-api/revisions/a6fb6a739212?raw)
