Start a generation
curl --request POST \
--url https://apis.tryflowy.ai/genstudio-svc-v2/api/v1/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "image",
"prompt": "a studio photo of a ceramic mug on a marble counter",
"aspect_ratio": "1:1",
"resolution": "1K"
}
'import requests
url = "https://apis.tryflowy.ai/genstudio-svc-v2/api/v1/generations"
payload = {
"type": "image",
"prompt": "a studio photo of a ceramic mug on a marble counter",
"aspect_ratio": "1:1",
"resolution": "1K"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'image',
prompt: 'a studio photo of a ceramic mug on a marble counter',
aspect_ratio: '1:1',
resolution: '1K'
})
};
fetch('https://apis.tryflowy.ai/genstudio-svc-v2/api/v1/generations', 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://apis.tryflowy.ai/genstudio-svc-v2/api/v1/generations",
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([
'type' => 'image',
'prompt' => 'a studio photo of a ceramic mug on a marble counter',
'aspect_ratio' => '1:1',
'resolution' => '1K'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://apis.tryflowy.ai/genstudio-svc-v2/api/v1/generations"
payload := strings.NewReader("{\n \"type\": \"image\",\n \"prompt\": \"a studio photo of a ceramic mug on a marble counter\",\n \"aspect_ratio\": \"1:1\",\n \"resolution\": \"1K\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://apis.tryflowy.ai/genstudio-svc-v2/api/v1/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"image\",\n \"prompt\": \"a studio photo of a ceramic mug on a marble counter\",\n \"aspect_ratio\": \"1:1\",\n \"resolution\": \"1K\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apis.tryflowy.ai/genstudio-svc-v2/api/v1/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"image\",\n \"prompt\": \"a studio photo of a ceramic mug on a marble counter\",\n \"aspect_ratio\": \"1:1\",\n \"resolution\": \"1K\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"generationId": "64c3f2a1e8b9c0d1f2e3a4b5",
"status": "processing",
"type": "image",
"model": "gemini-3-flash",
"estimatedCredits": 12
}
}{
"error": "this API key lacks the runs:write scope"
}{
"error": "this API key lacks the runs:write scope"
}{
"error": "this API key lacks the runs:write scope"
}{
"error": "this API key lacks the runs:write scope"
}{
"error": "this API key lacks the runs:write scope"
}Generations
Start a generation
Generate an image or video directly. Bills the key’s wallet, or an explicit workspace.
POST
/
v1
/
generations
Start a generation
curl --request POST \
--url https://apis.tryflowy.ai/genstudio-svc-v2/api/v1/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "image",
"prompt": "a studio photo of a ceramic mug on a marble counter",
"aspect_ratio": "1:1",
"resolution": "1K"
}
'import requests
url = "https://apis.tryflowy.ai/genstudio-svc-v2/api/v1/generations"
payload = {
"type": "image",
"prompt": "a studio photo of a ceramic mug on a marble counter",
"aspect_ratio": "1:1",
"resolution": "1K"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'image',
prompt: 'a studio photo of a ceramic mug on a marble counter',
aspect_ratio: '1:1',
resolution: '1K'
})
};
fetch('https://apis.tryflowy.ai/genstudio-svc-v2/api/v1/generations', 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://apis.tryflowy.ai/genstudio-svc-v2/api/v1/generations",
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([
'type' => 'image',
'prompt' => 'a studio photo of a ceramic mug on a marble counter',
'aspect_ratio' => '1:1',
'resolution' => '1K'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://apis.tryflowy.ai/genstudio-svc-v2/api/v1/generations"
payload := strings.NewReader("{\n \"type\": \"image\",\n \"prompt\": \"a studio photo of a ceramic mug on a marble counter\",\n \"aspect_ratio\": \"1:1\",\n \"resolution\": \"1K\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://apis.tryflowy.ai/genstudio-svc-v2/api/v1/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"image\",\n \"prompt\": \"a studio photo of a ceramic mug on a marble counter\",\n \"aspect_ratio\": \"1:1\",\n \"resolution\": \"1K\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apis.tryflowy.ai/genstudio-svc-v2/api/v1/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"image\",\n \"prompt\": \"a studio photo of a ceramic mug on a marble counter\",\n \"aspect_ratio\": \"1:1\",\n \"resolution\": \"1K\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"generationId": "64c3f2a1e8b9c0d1f2e3a4b5",
"status": "processing",
"type": "image",
"model": "gemini-3-flash",
"estimatedCredits": 12
}
}{
"error": "this API key lacks the runs:write scope"
}{
"error": "this API key lacks the runs:write scope"
}{
"error": "this API key lacks the runs:write scope"
}{
"error": "this API key lacks the runs:write scope"
}{
"error": "this API key lacks the runs:write scope"
}The generation starts asynchronously and returns a
generationId immediately. Poll Get a generation until its status is completed, then read outputs[0].url.
By default the generation is billed to the key’s own wallet — for account-bound keys, your account wallet. Pass workspace_id (see List workspaces) to act in and bill another workspace you can manage.Authorizations
A workspace API key. Secret keys (flowy_…) are server-side — keep them private. Publishable keys (flowy_pk_…) are browser-safe but only work from their allowlisted domains.
Body
application/json
Optionally bill a different workspace the account can manage; default is the key's own wallet.
Audio only; default sfx
Available options:
sfx, music 3d only; default glb
Available options:
glb, usdz, fbx, obj, stl 3d only; default All
Available options:
All, PBR, Shaded Response
Generation accepted. Poll GET /v1/generations/{generationId}.
Show child attributes
Show child attributes
Was this page helpful?
⌘I

