---
title: "Generate audio from an article"
method: POST
path: "/api/v1/ai/text-to-speech"
tags: ["AI"]
---

# Generate audio from an article

`POST /api/v1/ai/text-to-speech`

## Request

- Base URL: `https://feednest.com`
- URL: `https://feednest.com/api/v1/ai/text-to-speech`
- Auth: HTTP bearer

Generates a text-to-speech audio file for the given article. Requires the `ai` scope.

## Request body

- object
  - `article_id` string, uuid, required
  - `retry` boolean: Set true to retry a previously failed generation.

## Response `200`

Audio generated or in progress. When `status` is `in_progress`, another user is generating the same audio, so poll again in a few seconds.

- object
  - `data` object, required
    - `audio_url` string, uri, nullable, required: Signed URL for the audio file. Null when status is in_progress.
    - `duration_seconds` integer, required: Estimated duration in seconds (based on word count at ~150 WPM).
    - `status` 'in_progress': Present only when audio is being generated by another request. Poll again shortly.

## Other responses

- `400`: Input validation failed
- `401`: Missing or invalid API key
- `403`: Insufficient permissions or subscription required
- `404`: Resource not found
- `429`: Rate limit exceeded
- `500`: Audio generation failed (e.g., a previous generation attempt failed). The client may retry.

---

[API](https://skmtc.dev/feednest/apis/feednest-public-api.md) · [All operations](https://skmtc.dev/feednest/apis/feednest-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/feednest/apis/feednest-public-api/revisions/51c8242d8418?raw)
