Photorealistic & Vector Styling
Render photorealistic photos, 3D renders, cyberpunk art, or minimalist vector illustrations on demand.
Turn text prompts into visuals and mockups. You only pay for images that are actually generated.
https://rsflowhub.com/api/v1/ai/image-generation
X-API-Key header{
"prompt": "A futuristic city skyline at sunset, cyberpunk style.",
"size": "1024x1024"
}
{
"result": {
"images": [
{
"url": "https://rsflowhub.com/storage/generated/20261019/img_7c1e9a40d2b84f63a1c5e8d07b9f2a6c41de3b58.jpg",
"mime_type": "image/jpeg",
"width": 1024,
"height": 1024,
"expires_at": "2026-10-26T10:30:00+00:00"
}
]
}
}
AI Image Generation API is a REST API on RSFlowHub for web, mobile and AI agent applications. Send a JSON request to POST /api/v1/ai/image-generation with your API key; RSFlowHub runs it on a tuned AI model, falls back to a backup provider if needed, and returns a structured JSON result, usually within 1 to 3 seconds.
POST /api/v1/ai/image-generationX-API-Key headerSend these fields as a JSON body. An invalid or missing field returns a 422 error that names the field.
| Field | Type | Required | Description |
|---|---|---|---|
prompt |
string | Required | Image generation prompt (Max: 4,000 chars) |
style |
string | Optional | Visual style, e.g. "photorealistic", "illustration", "3d_render" |
aspect_ratio |
string | Optional | Image shape: "1:1", "3:2", "2:3", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9" or "21:9". Default is "1:1". |
size |
string | Optional | Older way to pick the shape, e.g. "1024x1024" or "1024x1792": mapped to the closest aspect ratio. Images are always about 1 megapixel. Ignored when aspect_ratio is set. |
n |
integer | Optional | Number of images to generate (1 to 4). Each generated image is billed separately. |
Copy, replace rfh_your_api_key with your key and run. Prefer a client library? See the official SDKs.
curl -X POST "https://rsflowhub.com/api/v1/ai/image-generation" \
-H "Content-Type: application/json" \
-H "X-API-Key: rfh_your_api_key" \
-d '{"prompt":"A futuristic city skyline at sunset, cyberpunk style.","size":"1024x1024"}'
<?php
$client = new \GuzzleHttp\Client();
$response = $client->post('https://rsflowhub.com/api/v1/ai/image-generation', [
'headers' => [
'Content-Type' => 'application/json',
'X-API-Key' => 'rfh_your_api_key',
],
'json' => array (
'prompt' => 'A futuristic city skyline at sunset, cyberpunk style.',
'size' => '1024x1024',
),
]);
echo $response->getBody();
const response = await fetch('https://rsflowhub.com/api/v1/ai/image-generation', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'rfh_your_api_key'
},
body: JSON.stringify({"prompt":"A futuristic city skyline at sunset, cyberpunk style.","size":"1024x1024"})
});
const data = await response.json();
console.log(data);
import requests
url = "https://rsflowhub.com/api/v1/ai/image-generation"
headers = {
"Content-Type": "application/json",
"X-API-Key": "rfh_your_api_key"
}
payload = {"prompt":"A futuristic city skyline at sunset, cyberpunk style.","size":"1024x1024"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
Every RSFlowHub endpoint uses the same envelope, so one parser handles all of them. Failed calls are not charged.
{
"success": true,
"request_id": "req_3f9a2c7e-5b1d-4e8a-9c2f-7d6e1a0b4c8d",
"data": {
"result": {
"images": [
{
"url": "https://rsflowhub.com/storage/generated/20261019/img_7c1e9a40d2b84f63a1c5e8d07b9f2a6c41de3b58.jpg",
"mime_type": "image/jpeg",
"width": 1024,
"height": 1024,
"expires_at": "2026-10-26T10:30:00+00:00"
}
]
}
},
"meta": {
"version": "v1",
"timestamp": "2026-10-05T09:30:00Z"
}
}
{
"success": false,
"request_id": "req_8c1d4e2a-7f3b-4a9c",
"error": {
"code": "VALIDATION_ERROR",
"message": "The given data was invalid.",
"details": {
"prompt": [
"This field is required."
]
}
},
"meta": {
"version": "v1",
"timestamp": "2026-10-05T09:30:00Z"
}
}
| Field | Type | Meaning |
|---|---|---|
success | boolean | true when the call worked, false on any error. |
request_id | string | Unique id for this call. Quote it when you contact support. |
data.result | object | The result of this endpoint (see the example). |
error | object | Only on failure: code, message and details per field. |
meta | object | API version and server timestamp. |
All error codes: Errors reference
Render photorealistic photos, 3D renders, cyberpunk art, or minimalist vector illustrations on demand.
Generate assets in 1:1 (square), 16:9 (landscape), 9:16 (mobile story), 4:3, 3:2, 21:9 and more, at about 1 megapixel (1024x1024 for square).
Prompts blocked by the safety filter return HTTP 422 CONTENT_BLOCKED and cost no credits.
Each image comes back as an HTTPS URL with its size, type and expiry time. Download it within 7 days.
How teams use the AI Image Generation API in production.
Generate bespoke header visuals matching article topics upon content publication.
https://rsflowhub.com/storage/generated/img_8f9a2b1c.jpgCreates unique article images without stock photo licensing.
Stage products into realistic lifestyle backgrounds (e.g., modern living room, kitchen table).
https://rsflowhub.com/storage/generated/img_mug_lifestyle.jpgAccelerates product merchandising without booking expensive studio photo sessions.
Produce 10+ visual creative variations for Facebook and Instagram A/B ad testing.
https://rsflowhub.com/storage/generated/img_ad_variant_3.jpgDecreases customer acquisition costs (CAC) by identifying winning visual creatives.
The same job done three ways.
| Topic | RSFlowHub API | Raw LLM prompts | Rules / regex |
|---|---|---|---|
| Output | Validated JSON fields | Free text you have to parse | Fixed patterns only |
| Setup | One POST request, no prompts | Write and maintain prompts and parsing | Write and maintain rule lists |
| Provider outage | Automatic fallback to a backup model | You build retries and a second vendor | Not applicable |
| Pricing | 120 credits per call, failed calls free | Per token, per vendor | Your own servers and upkeep |
| Understands context | Yes, AI model | Yes, AI model | No, keywords only |
Free plan with 100 credits/month + 1,000 bonus credits when you sign in before 23 Nov. Test it in the playground first, no code needed.
Flowy
AI assistant