---
title: "Audio generation job"
method: POST
path: "/audio/generations"
---

# Audio generation job

`POST /audio/generations`

## Request

- Base URL: `https://api.openmayhem.ai/v1`
- URL: `https://api.openmayhem.ai/v1/audio/generations`
- Auth: HTTP bearer

Requires the AUDIO_GENERATIONS scope. Returns an asynchronous job.

## Headers

- `X-Mayhem-Min-Att-Tier` union
  - integer
  - 'T1' | 'T2' | 'T3' | 'T4'
- `X-Mayhem-Min-Ctx` integer
- `X-Mayhem-Quant` string
- `X-Mayhem-Prefer-Providers` string
- `X-Mayhem-Hedge` 0 | 1
- `X-Mayhem-Min-Tok-S` number
- `X-Mayhem-Max-Wait-Ms` integer
- `X-OpenMayhem-Max-Cost-Usd` string: Non-negative decimal USD string with at most 6 decimal places, parsed with exact fixed-point arithmetic.
- `X-OpenMayhem-Max-Input-Price-Per-Million-Usd` string: Non-negative decimal USD string with at most 6 decimal places, parsed with exact fixed-point arithmetic.
- `X-OpenMayhem-Max-Output-Price-Per-Million-Usd` string: Non-negative decimal USD string with at most 6 decimal places, parsed with exact fixed-point arithmetic.
- `X-OpenMayhem-Max-Representative-Request-Price-Usd` string: Non-negative decimal USD string with at most 6 decimal places, parsed with exact fixed-point arithmetic.
- `X-OpenMayhem-Estimate` string

## Request body

- object
  - `model` string, required: Catalog model id (vendor/model).
  - `prompt` string, required

## Response `202`

The created job. Poll polling_url until a terminal status.

- Job
  - `id` string
  - `status` 'submitted' | 'running' | 'reconciling' | 'completed' | 'failed' | 'cancelled'
  - `polling_url` string
  - `cost` string: USD, set once settled.
  - `retail_cost_limit` string, nullable: Effective per-request retail USD cap after combining request and API-key limits.
  - `routing` object: Validated routing controls frozen when the job was submitted.
  - `artifacts` object[]
    - `id` string
    - `content_type` string
    - `size_bytes` integer

## Other responses

- `400`: Contract violation; nothing charged.
- `401`: Missing or invalid API key.
- `402`: Insufficient credit.
- `403`: Scope, allowlist, spend limit or account restriction.
- `429`: Rate limit; wait Retry-After seconds.
- `503`: No provider capacity; retry with backoff.

---

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