Generate Image
curl --request POST \
--url https://api.supapost.so/generate/image \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"model": "<string>",
"aspect_ratio": "<string>",
"reference_image_url": "<string>",
"reference_strength": 123,
"influencerId": "<string>"
}
'import requests
url = "https://api.supapost.so/generate/image"
payload = {
"prompt": "<string>",
"model": "<string>",
"aspect_ratio": "<string>",
"reference_image_url": "<string>",
"reference_strength": 123,
"influencerId": "<string>"
}
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>',
model: '<string>',
aspect_ratio: '<string>',
reference_image_url: '<string>',
reference_strength: 123,
influencerId: '<string>'
})
};
fetch('https://api.supapost.so/generate/image', 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.supapost.so/generate/image",
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>',
'model' => '<string>',
'aspect_ratio' => '<string>',
'reference_image_url' => '<string>',
'reference_strength' => 123,
'influencerId' => '<string>'
]),
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.supapost.so/generate/image"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"model\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"reference_image_url\": \"<string>\",\n \"reference_strength\": 123,\n \"influencerId\": \"<string>\"\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.supapost.so/generate/image")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"model\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"reference_image_url\": \"<string>\",\n \"reference_strength\": 123,\n \"influencerId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.supapost.so/generate/image")
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\": \"<string>\",\n \"model\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"reference_image_url\": \"<string>\",\n \"reference_strength\": 123,\n \"influencerId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"job_id": "0b1e9a5f-1234-4d8c-b2a0-...",
"status": "pending"
}
{
"success": false,
"message": "prompt is required"
}
{
"success": false,
"message": "Rate limit exceeded for expensive endpoints. Retry in 60s."
}
Generation
Generate Image
Queue an image generation job
POST
/
generate
/
image
Generate Image
curl --request POST \
--url https://api.supapost.so/generate/image \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"model": "<string>",
"aspect_ratio": "<string>",
"reference_image_url": "<string>",
"reference_strength": 123,
"influencerId": "<string>"
}
'import requests
url = "https://api.supapost.so/generate/image"
payload = {
"prompt": "<string>",
"model": "<string>",
"aspect_ratio": "<string>",
"reference_image_url": "<string>",
"reference_strength": 123,
"influencerId": "<string>"
}
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>',
model: '<string>',
aspect_ratio: '<string>',
reference_image_url: '<string>',
reference_strength: 123,
influencerId: '<string>'
})
};
fetch('https://api.supapost.so/generate/image', 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.supapost.so/generate/image",
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>',
'model' => '<string>',
'aspect_ratio' => '<string>',
'reference_image_url' => '<string>',
'reference_strength' => 123,
'influencerId' => '<string>'
]),
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.supapost.so/generate/image"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"model\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"reference_image_url\": \"<string>\",\n \"reference_strength\": 123,\n \"influencerId\": \"<string>\"\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.supapost.so/generate/image")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"model\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"reference_image_url\": \"<string>\",\n \"reference_strength\": 123,\n \"influencerId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.supapost.so/generate/image")
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\": \"<string>\",\n \"model\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"reference_image_url\": \"<string>\",\n \"reference_strength\": 123,\n \"influencerId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"job_id": "0b1e9a5f-1234-4d8c-b2a0-...",
"status": "pending"
}
{
"success": false,
"message": "prompt is required"
}
{
"success": false,
"message": "Rate limit exceeded for expensive endpoints. Retry in 60s."
}
Generates an image from a text prompt. This endpoint is always async — it returns a
job_id immediately and the actual generation happens on a background queue. Poll GET /jobs/:id until status is completed, then read result.url.
The completed image is automatically uploaded to R2 storage and saved to the team’s asset library.
Authentication
string
Bearer token.
Bearer <api-key-or-jwt>.Body
string
required
Text description of the image to generate.
string
default:"fal:flux-schnell"
Model identifier in
provider:model format. Use GET /models to list options.string
Aspect ratio for the generated image, e.g.
"9:16", "1:1", "16:9".string
URL of a reference image for image-to-image generation.
number
How closely to follow the reference image (0-1). Only used when
reference_image_url is provided.string
If provided, the completed image is automatically appended to this influencer’s image array. Survives the user navigating away mid-generation.
Polling pattern
# 1. Submit
curl -X POST https://api.supapost.so/generate/image \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "sunset over tokyo", "aspect_ratio": "9:16"}'
# → 202 { "job_id": "0b1e...", "status": "pending" }
# 2. Poll every 1-2 seconds
curl https://api.supapost.so/jobs/0b1e... \
-H "Authorization: Bearer $KEY"
# → { "status": "processing", ... }
# → { "status": "completed", "result": { "url": "https://cdn.supapost.so/...jpg" } }
{
"job_id": "0b1e9a5f-1234-4d8c-b2a0-...",
"status": "pending"
}
{
"success": false,
"message": "prompt is required"
}
{
"success": false,
"message": "Rate limit exceeded for expensive endpoints. Retry in 60s."
}
⌘I