---
title: "Generate a voiceover script from photos"
method: POST
path: "/api/generate_voice_script"
tags: ["Video"]
---

# Generate a voiceover script from photos

`POST /api/generate_voice_script`

## Request

- Base URL: `https://app.pedra.ai`
- URL: `https://app.pedra.ai/api/generate_voice_script`
- Auth: none required

Writes a short, natural voiceover script from listing photos and optional property facts, using vision so the script reflects what's in the images. Returns the script text — pass it to /api/generate_voice. Free.

## Request body

- object
  - `apiKey` string, required: Account API key, sent in the request body. Get one at https://app.pedra.ai under Settings → API.
  - `images` string[]: Photos to base the script on: URL strings or { imageUrl } objects.
  - `propertyCharacteristics` PropertyCharacteristic[]
    - `label` string, required: Characteristic name. Built-in labels (Bedrooms, Bathrooms, Surface, Price, Location, Parking, Heating, Outdoor) render with an icon.
    - `value` string, required
  - `language` string: Script language. See /api/music_library for accepted values.

## Response `200`

Script generated.

- object
  - `message` string
  - `script` string: The generated voiceover script.

## Other responses

- `400`: Invalid request — bad or unreachable image URL, missing required field, or validation error.
- `404`: Missing, invalid, or revoked API key.
- `405`: Wrong HTTP method — all endpoints accept POST (credits also accepts GET).

---

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