curl --request POST \
--url http://localhost:3000/api/v1/image/generate \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"artifactId": "<string>",
"aspect": "<string>",
"async": true,
"asyncWorker": true,
"background": "<string>",
"caption": "<string>",
"compression": "<string>",
"format": "<string>",
"mode": "<string>",
"model": "<string>",
"output": "<string>",
"provider": "<string>",
"quality": "<string>",
"send": true,
"size": "<string>",
"source": "<string>",
"sync": true
}
'import requests
url = "http://localhost:3000/api/v1/image/generate"
payload = {
"prompt": "<string>",
"artifactId": "<string>",
"aspect": "<string>",
"async": True,
"asyncWorker": True,
"background": "<string>",
"caption": "<string>",
"compression": "<string>",
"format": "<string>",
"mode": "<string>",
"model": "<string>",
"output": "<string>",
"provider": "<string>",
"quality": "<string>",
"send": True,
"size": "<string>",
"source": "<string>",
"sync": True
}
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: '<string>',
artifactId: '<string>',
aspect: '<string>',
async: true,
asyncWorker: true,
background: '<string>',
caption: '<string>',
compression: '<string>',
format: '<string>',
mode: '<string>',
model: '<string>',
output: '<string>',
provider: '<string>',
quality: '<string>',
send: true,
size: '<string>',
source: '<string>',
sync: true
})
};
fetch('http://localhost:3000/api/v1/image/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_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/v1/image/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' => '<string>',
'artifactId' => '<string>',
'aspect' => '<string>',
'async' => true,
'asyncWorker' => true,
'background' => '<string>',
'caption' => '<string>',
'compression' => '<string>',
'format' => '<string>',
'mode' => '<string>',
'model' => '<string>',
'output' => '<string>',
'provider' => '<string>',
'quality' => '<string>',
'send' => true,
'size' => '<string>',
'source' => '<string>',
'sync' => true
]),
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 := "http://localhost:3000/api/v1/image/generate"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"artifactId\": \"<string>\",\n \"aspect\": \"<string>\",\n \"async\": true,\n \"asyncWorker\": true,\n \"background\": \"<string>\",\n \"caption\": \"<string>\",\n \"compression\": \"<string>\",\n \"format\": \"<string>\",\n \"mode\": \"<string>\",\n \"model\": \"<string>\",\n \"output\": \"<string>\",\n \"provider\": \"<string>\",\n \"quality\": \"<string>\",\n \"send\": true,\n \"size\": \"<string>\",\n \"source\": \"<string>\",\n \"sync\": true\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("http://localhost:3000/api/v1/image/generate")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"artifactId\": \"<string>\",\n \"aspect\": \"<string>\",\n \"async\": true,\n \"asyncWorker\": true,\n \"background\": \"<string>\",\n \"caption\": \"<string>\",\n \"compression\": \"<string>\",\n \"format\": \"<string>\",\n \"mode\": \"<string>\",\n \"model\": \"<string>\",\n \"output\": \"<string>\",\n \"provider\": \"<string>\",\n \"quality\": \"<string>\",\n \"send\": true,\n \"size\": \"<string>\",\n \"source\": \"<string>\",\n \"sync\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/v1/image/generate")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"<string>\",\n \"artifactId\": \"<string>\",\n \"aspect\": \"<string>\",\n \"async\": true,\n \"asyncWorker\": true,\n \"background\": \"<string>\",\n \"caption\": \"<string>\",\n \"compression\": \"<string>\",\n \"format\": \"<string>\",\n \"mode\": \"<string>\",\n \"model\": \"<string>\",\n \"output\": \"<string>\",\n \"provider\": \"<string>\",\n \"quality\": \"<string>\",\n \"send\": true,\n \"size\": \"<string>\",\n \"source\": \"<string>\",\n \"sync\": true\n}"
response = http.request(request)
puts response.read_body{}Generate an image from a text prompt
curl --request POST \
--url http://localhost:3000/api/v1/image/generate \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"artifactId": "<string>",
"aspect": "<string>",
"async": true,
"asyncWorker": true,
"background": "<string>",
"caption": "<string>",
"compression": "<string>",
"format": "<string>",
"mode": "<string>",
"model": "<string>",
"output": "<string>",
"provider": "<string>",
"quality": "<string>",
"send": true,
"size": "<string>",
"source": "<string>",
"sync": true
}
'import requests
url = "http://localhost:3000/api/v1/image/generate"
payload = {
"prompt": "<string>",
"artifactId": "<string>",
"aspect": "<string>",
"async": True,
"asyncWorker": True,
"background": "<string>",
"caption": "<string>",
"compression": "<string>",
"format": "<string>",
"mode": "<string>",
"model": "<string>",
"output": "<string>",
"provider": "<string>",
"quality": "<string>",
"send": True,
"size": "<string>",
"source": "<string>",
"sync": True
}
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: '<string>',
artifactId: '<string>',
aspect: '<string>',
async: true,
asyncWorker: true,
background: '<string>',
caption: '<string>',
compression: '<string>',
format: '<string>',
mode: '<string>',
model: '<string>',
output: '<string>',
provider: '<string>',
quality: '<string>',
send: true,
size: '<string>',
source: '<string>',
sync: true
})
};
fetch('http://localhost:3000/api/v1/image/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_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/v1/image/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' => '<string>',
'artifactId' => '<string>',
'aspect' => '<string>',
'async' => true,
'asyncWorker' => true,
'background' => '<string>',
'caption' => '<string>',
'compression' => '<string>',
'format' => '<string>',
'mode' => '<string>',
'model' => '<string>',
'output' => '<string>',
'provider' => '<string>',
'quality' => '<string>',
'send' => true,
'size' => '<string>',
'source' => '<string>',
'sync' => true
]),
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 := "http://localhost:3000/api/v1/image/generate"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"artifactId\": \"<string>\",\n \"aspect\": \"<string>\",\n \"async\": true,\n \"asyncWorker\": true,\n \"background\": \"<string>\",\n \"caption\": \"<string>\",\n \"compression\": \"<string>\",\n \"format\": \"<string>\",\n \"mode\": \"<string>\",\n \"model\": \"<string>\",\n \"output\": \"<string>\",\n \"provider\": \"<string>\",\n \"quality\": \"<string>\",\n \"send\": true,\n \"size\": \"<string>\",\n \"source\": \"<string>\",\n \"sync\": true\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("http://localhost:3000/api/v1/image/generate")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"artifactId\": \"<string>\",\n \"aspect\": \"<string>\",\n \"async\": true,\n \"asyncWorker\": true,\n \"background\": \"<string>\",\n \"caption\": \"<string>\",\n \"compression\": \"<string>\",\n \"format\": \"<string>\",\n \"mode\": \"<string>\",\n \"model\": \"<string>\",\n \"output\": \"<string>\",\n \"provider\": \"<string>\",\n \"quality\": \"<string>\",\n \"send\": true,\n \"size\": \"<string>\",\n \"source\": \"<string>\",\n \"sync\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/v1/image/generate")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"<string>\",\n \"artifactId\": \"<string>\",\n \"aspect\": \"<string>\",\n \"async\": true,\n \"asyncWorker\": true,\n \"background\": \"<string>\",\n \"caption\": \"<string>\",\n \"compression\": \"<string>\",\n \"format\": \"<string>\",\n \"mode\": \"<string>\",\n \"model\": \"<string>\",\n \"output\": \"<string>\",\n \"provider\": \"<string>\",\n \"quality\": \"<string>\",\n \"send\": true,\n \"size\": \"<string>\",\n \"source\": \"<string>\",\n \"sync\": true\n}"
response = http.request(request)
puts response.read_body{}Body
Text prompt describing the image to generate
Internal artifact id for async worker continuation
Aspect ratio: 1:1, 2:3, 3:2, 3:4, 4:3, 9:16, 16:9, 21:9
Compatibility no-op: image generation is async by default
Internal background worker mode
OpenAI background: transparent, opaque, auto
Caption when sending (used with --send)
OpenAI jpeg/webp output compression
OpenAI output format: png, jpeg, webp
Legacy quality mode: fast or quality. Default: fast
Provider image model override
Output directory (default: /tmp)
Image provider: gemini or openai
OpenAI quality: low, medium, high, auto
Auto-send generated image to the current chat
Image size: 1K, 2K, 4K (default: 1K)
Source image path for editing/reference
Wait for provider completion before returning
Response
Success — no @Returns schema declared; payload shape is loose.
The response is of type object.