# Direct a narration draft

`POST https://api.vidmoat.com/v1/speech/directions`

- Scope: `speech.generate`
- Cost: pricing.direction credits from capabilities

Submit a recoverable narration drafting request. Returns a job ID; poll the existing generation status endpoint. Success proposes reply, script and speed with applied:false and audioGenerated:false. Review with the person before creating a speech generation. No publishing or consent action is available.

### Body

- `voiceId` (string, required): A ready own or published creator voice.
- `brief` (string, required): Your direction, 1 to 2,000 characters.
- `currentScript` (string, optional): Optional existing script, up to 8,000 Unicode characters.
- `speed` (number, optional): Current pace, 0.75 to 1.25.
- `expression` (number, optional): Optional current delivery intensity, 0 to 1, only when capabilities.settings.expression is present.

## Response

Returns `202`.

## Errors

Besides the errors any request can get ([authentication](https://developer.vidmoat.com/developer/docs/authentication#when-a-request-is-refused), [rate limits](https://developer.vidmoat.com/developer/docs/rate-limits)):

| Status | Code | When |
| --- | --- | --- |
| 409 | [`conflict`](https://developer.vidmoat.com/developer/docs/errors#conflict) | The idempotency key belongs to different inputs, or the job is not in the required state. |
| 503 | [`unavailable`](https://developer.vidmoat.com/developer/docs/errors#unavailable) | Inference, private storage, configured pilot billing or the limiter is unavailable. Nothing new is charged before admission. |

## Request examples

```bash curl
curl --fail-with-body "https://api.vidmoat.com/v1/speech/directions" -H "Authorization: Bearer $VIDMOAT_KEY" -H "Content-Type: application/json" -H "Idempotency-Key: $REQUEST_ID" -d '{"voiceId":"VOICE_ID","brief":"A twenty-second introduction for my video"}'
```

```js Node
const res = await fetch('https://api.vidmoat.com/v1/speech/directions', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.VIDMOAT_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    voiceId: 'VOICE_ID',
    brief: 'A twenty-second introduction for my video',
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? `HTTP ${res.status}`);
console.log(data);
```

```python Python
import os
import requests

res = requests.post(
    "https://api.vidmoat.com/v1/speech/directions",
    headers={"Authorization": f"Bearer {os.environ['VIDMOAT_KEY']}"},
    json={
      "voiceId": "VOICE_ID",
      "brief": "A twenty-second introduction for my video",
    },
    timeout=60,
)
res.raise_for_status()
print(res.json())
```

## Example response

```json
{
  "id": "11111111-1111-4111-8111-111111111111",
  "voiceId": "22222222-2222-4222-8222-222222222222",
  "kind": "generate",
  "status": "queued",
  "refunded": false,
  "pipeline": "openvoice-v2-melo-1",
  "result": null,
  "error": null
}
```

---

Source: https://developer.vidmoat.com/developer/docs/api/speech/direction
Previous: [Creator voice usage](https://developer.vidmoat.com/developer/docs/api/speech/voice-usage.md)
Next: [Create a voice](https://developer.vidmoat.com/developer/docs/api/speech/create-voice.md)
All documentation: https://developer.vidmoat.com/llms-full.txt
