API reference
All generation endpoints are asynchronous: they return a task ID, and you retrieve the result separately.
Base URL and auth#
curl -X POST https://api.dev.runwayml.com/v1/image_to_video \
-H "Authorization: Bearer $RUNWAYML_API_SECRET" \
-H "Content-Type: application/json" \
-d '{ "model": "gen4.5", "promptText": "A sunrise", "ratio": "1280:720", "duration": 5 }'The request lifecycle#
POSTto a generation endpoint — returns{ "id": "..." }immediately.GET /v1/tasks/{id}— poll untilSUCCEEDED,FAILEDorCANCELED.- Read
output[0]and download it within 24–48 hours before the URL expires.
The SDKs collapse steps 1 and 2 into .waitForTaskOutput(). See waiting for output.
Related#
- Making API calls — working code for every endpoint
- Models — valid
modelvalues - HTTP errors — status codes and retry safety
Call these endpoints with your own key
Set RUNWAYML_API_SECRET and every example here runs unmodified.