GPT IMAGE 2.5 | WAN 3.0 | SEEDANCE 2.5 IS NOW LIVE!

GENERATE YOUR VIDEOS WITH UNLIMITED SEEDANCE 2.5 TODAY.

NO EXTRA SUBSCRIPTION
REVIRAL
Get API key
Browse API docs

Endpoints

AI Script Writer API

Was this page helpful?

Use the free AI script writer API to turn a brief into one or more moderated short-video scripts, then review the text before starting a paid render.

Keyword target: AI script writer API

The script endpoint creates short-video copy from a structured brief using the same moderated writer as the Reviral app. Writing is free; credits are charged only if the approved text is later submitted to a render or media-generation endpoint.

  1. Describe the topic, audience, offer, and desired action in prompt.
  2. Set durationSec and optional tone, format, media type, variant count, or supporting asset text.
  3. Review the returned script, then pass approved copy to the appropriate video endpoint.

Working example

Set REVIRAL_API_KEY only in your server environment, then run this request with values valid for your account.

curl -X POST "https://reviral.ai/api/v1/script" \
  -H "Authorization: Bearer $REVIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"prompt":"Write a practical 30-second script showing three ways a travel mug prevents commuter spills.","durationSec":30,"tone":"conversational","variants":1,"wordsOnly":false,"assetBlocks":[]}'
Example response
{
  "data": {
    "ok": true,
    "script": {
      "title": "The five-second bag test",
      "voiceover": "Your commute should not begin with coffee inside your bag..."
    },
    "scripts": [
      {
        "title": "The five-second bag test",
        "voiceover": "Your commute should not begin with coffee inside your bag..."
      }
    ],
    "promptVariant": null
  }
}

Frequently asked questions

Does the script writer charge credits?
No. Script writing is free. A later render request is priced and charged separately.
Can the script endpoint return variants?
Yes. Request one to three variants, then choose and edit the strongest result before rendering.
Is script input moderated?
Yes. The public endpoint uses the same validation and moderation path as the product writer.
POST

/api/v1/script

Write a script

Uses the same moderated free script writer as the product.

Authentication: Bearer API key required

curl -X POST "https://reviral.ai/api/v1/script" \
  -H "Authorization: Bearer $REVIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"prompt":"Write a practical 30-second script showing three ways a travel mug prevents commuter spills.","durationSec":30,"tone":"conversational","variants":1,"wordsOnly":false,"assetBlocks":[]}'

Request body

FieldTypeRequiredDescription
promptstringYes
durationSecinteger (min 15, max 120)No
tonestringNo
scriptFormatstringNo
mediaTypestringNo
variantsinteger (min 1, max 3)No
wordsOnlybooleanNo
assetBlocksarrayNo

Responses

200
Script response
400
Settings are invalid or a reference field is unsupported
401
Key is missing, revoked, or invalid
422
Settings are invalid or a reference field is unsupported
429
Too many requests
500
Job could not be started
503
Models or rate limiting are temporarily unavailable