Skip to main content
POST
/
v1
/
ai
/
text-to-image
/
runway
Create image from text - RunWay
curl --request POST \
  --url https://api.freepik.com/v1/ai/text-to-image/runway \
  --header 'Content-Type: application/json' \
  --header 'x-freepik-api-key: <api-key>' \
  --data '
{
  "prompt": "A serene mountain landscape at sunset with golden light",
  "ratio": "1920:1080",
  "seed": 12345,
  "webhook_url": "https://www.example.com/webhook"
}
'
{
"data": {
"generated": [],
"task_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"status": "IN_PROGRESS"
}
}

Authorizations

x-freepik-api-key
string
header
required

Your Freepik API key. Required for authentication. Learn how to obtain an API key

Body

application/json
prompt
string
required

Text prompt describing the desired image.

Tips:

  • Be specific about visual details and composition
  • RunWay excels at photorealistic and artistic images
  • Reference images can be used with @tag syntax

Examples:

  • Simple: "A serene mountain landscape at sunset"
  • Detailed: "A majestic lion in the savanna at golden hour, cinematic lighting"
Required string length: 1 - 1000
Example:

"A serene mountain landscape at sunset with golden light"

ratio
enum<string>
required

Image aspect ratio (width:height).

Available ratios:

  • 1920:1080: Landscape (16:9)
  • 1080:1920: Portrait (9:16)
  • 1024:1024: Square
  • 1280:720: HD Landscape
  • 720:1280: HD Portrait
Available options:
1920:1080,
1080:1920,
1024:1024,
1360:768,
1080:1080,
1168:880,
1440:1080,
1080:1440,
1808:768,
2112:912,
1280:720,
720:1280,
720:720,
960:720,
720:960,
1680:720
Example:

"1920:1080"

seed
integer

Random seed for reproducibility. Using the same seed with identical parameters produces the same image.

Required range: 0 <= x <= 4294967295
Example:

12345

webhook_url
string<uri>

Optional callback URL that will receive asynchronous notifications whenever the task changes status. The payload sent to this URL is the same as the corresponding GET endpoint response, but without the data field.

Example:

"https://www.example.com/webhook"

Response

OK - The request has succeeded and the RunWay process has started.

data
object
required
Example:
{
"task_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"status": "CREATED",
"generated": [
"https://openapi-generator.tech",
"https://openapi-generator.tech"
]
}