Generate image using DALL-E or other providers
curl --request POST \
--url https://api.runflow.ai/api/v1/runtime/v1/images/generate \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "A futuristic city skyline at sunset with flying cars",
"provider": "openai",
"model": "dall-e-3",
"providerName": "OpenAI Production",
"size": "1024x1024",
"quality": "standard",
"style": "vivid",
"n": 1
}
'import requests
url = "https://api.runflow.ai/api/v1/runtime/v1/images/generate"
payload = {
"prompt": "A futuristic city skyline at sunset with flying cars",
"provider": "openai",
"model": "dall-e-3",
"providerName": "OpenAI Production",
"size": "1024x1024",
"quality": "standard",
"style": "vivid",
"n": 1
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: 'A futuristic city skyline at sunset with flying cars',
provider: 'openai',
model: 'dall-e-3',
providerName: 'OpenAI Production',
size: '1024x1024',
quality: 'standard',
style: 'vivid',
n: 1
})
};
fetch('https://api.runflow.ai/api/v1/runtime/v1/images/generate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.runflow.ai/api/v1/runtime/v1/images/generate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'prompt' => 'A futuristic city skyline at sunset with flying cars',
'provider' => 'openai',
'model' => 'dall-e-3',
'providerName' => 'OpenAI Production',
'size' => '1024x1024',
'quality' => 'standard',
'style' => 'vivid',
'n' => 1
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.runflow.ai/api/v1/runtime/v1/images/generate"
payload := strings.NewReader("{\n \"prompt\": \"A futuristic city skyline at sunset with flying cars\",\n \"provider\": \"openai\",\n \"model\": \"dall-e-3\",\n \"providerName\": \"OpenAI Production\",\n \"size\": \"1024x1024\",\n \"quality\": \"standard\",\n \"style\": \"vivid\",\n \"n\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.runflow.ai/api/v1/runtime/v1/images/generate")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"A futuristic city skyline at sunset with flying cars\",\n \"provider\": \"openai\",\n \"model\": \"dall-e-3\",\n \"providerName\": \"OpenAI Production\",\n \"size\": \"1024x1024\",\n \"quality\": \"standard\",\n \"style\": \"vivid\",\n \"n\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runflow.ai/api/v1/runtime/v1/images/generate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"A futuristic city skyline at sunset with flying cars\",\n \"provider\": \"openai\",\n \"model\": \"dall-e-3\",\n \"providerName\": \"OpenAI Production\",\n \"size\": \"1024x1024\",\n \"quality\": \"standard\",\n \"style\": \"vivid\",\n \"n\": 1\n}"
response = http.request(request)
puts response.read_bodyRuntime API - Core
Generate image using DALL-E or other providers
POST
/
api
/
v1
/
runtime
/
v1
/
images
/
generate
Generate image using DALL-E or other providers
curl --request POST \
--url https://api.runflow.ai/api/v1/runtime/v1/images/generate \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "A futuristic city skyline at sunset with flying cars",
"provider": "openai",
"model": "dall-e-3",
"providerName": "OpenAI Production",
"size": "1024x1024",
"quality": "standard",
"style": "vivid",
"n": 1
}
'import requests
url = "https://api.runflow.ai/api/v1/runtime/v1/images/generate"
payload = {
"prompt": "A futuristic city skyline at sunset with flying cars",
"provider": "openai",
"model": "dall-e-3",
"providerName": "OpenAI Production",
"size": "1024x1024",
"quality": "standard",
"style": "vivid",
"n": 1
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: 'A futuristic city skyline at sunset with flying cars',
provider: 'openai',
model: 'dall-e-3',
providerName: 'OpenAI Production',
size: '1024x1024',
quality: 'standard',
style: 'vivid',
n: 1
})
};
fetch('https://api.runflow.ai/api/v1/runtime/v1/images/generate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.runflow.ai/api/v1/runtime/v1/images/generate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'prompt' => 'A futuristic city skyline at sunset with flying cars',
'provider' => 'openai',
'model' => 'dall-e-3',
'providerName' => 'OpenAI Production',
'size' => '1024x1024',
'quality' => 'standard',
'style' => 'vivid',
'n' => 1
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.runflow.ai/api/v1/runtime/v1/images/generate"
payload := strings.NewReader("{\n \"prompt\": \"A futuristic city skyline at sunset with flying cars\",\n \"provider\": \"openai\",\n \"model\": \"dall-e-3\",\n \"providerName\": \"OpenAI Production\",\n \"size\": \"1024x1024\",\n \"quality\": \"standard\",\n \"style\": \"vivid\",\n \"n\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.runflow.ai/api/v1/runtime/v1/images/generate")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"A futuristic city skyline at sunset with flying cars\",\n \"provider\": \"openai\",\n \"model\": \"dall-e-3\",\n \"providerName\": \"OpenAI Production\",\n \"size\": \"1024x1024\",\n \"quality\": \"standard\",\n \"style\": \"vivid\",\n \"n\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runflow.ai/api/v1/runtime/v1/images/generate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"A futuristic city skyline at sunset with flying cars\",\n \"provider\": \"openai\",\n \"model\": \"dall-e-3\",\n \"providerName\": \"OpenAI Production\",\n \"size\": \"1024x1024\",\n \"quality\": \"standard\",\n \"style\": \"vivid\",\n \"n\": 1\n}"
response = http.request(request)
puts response.read_bodyBody
application/json
Prompt describing the image to generate
Example:
"A futuristic city skyline at sunset with flying cars"
LLM provider for image generation
Available options:
openai, azure, bedrock Image generation model
Example:
"dall-e-3"
Provider name (configured in LLM Providers) for credential resolution
Example:
"OpenAI Production"
Image size
Available options:
256x256, 512x512, 1024x1024, 1792x1024, 1024x1792 Image quality (DALL-E 3 only)
Available options:
standard, hd Image style (DALL-E 3 only)
Available options:
vivid, natural Number of images to generate
Required range:
1 <= x <= 4Response
Image generation result: { images: [{ url? | b64Json? }], model, provider, usage? }.
⌘I