Image generation
curl --request POST \
--url https://app.frogbot.ai/api/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"prompt": "<string>",
"n": 123,
"size": "<string>",
"quality": "<string>",
"response_format": "<string>"
}
'import requests
url = "https://app.frogbot.ai/api/v1/images/generations"
payload = {
"model": "<string>",
"prompt": "<string>",
"n": 123,
"size": "<string>",
"quality": "<string>",
"response_format": "<string>"
}
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({
model: '<string>',
prompt: '<string>',
n: 123,
size: '<string>',
quality: '<string>',
response_format: '<string>'
})
};
fetch('https://app.frogbot.ai/api/v1/images/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://app.frogbot.ai/api/v1/images/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([
'model' => '<string>',
'prompt' => '<string>',
'n' => 123,
'size' => '<string>',
'quality' => '<string>',
'response_format' => '<string>'
]),
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://app.frogbot.ai/api/v1/images/generations"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"n\": 123,\n \"size\": \"<string>\",\n \"quality\": \"<string>\",\n \"response_format\": \"<string>\"\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://app.frogbot.ai/api/v1/images/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"n\": 123,\n \"size\": \"<string>\",\n \"quality\": \"<string>\",\n \"response_format\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.frogbot.ai/api/v1/images/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 \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"n\": 123,\n \"size\": \"<string>\",\n \"quality\": \"<string>\",\n \"response_format\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"created": 1709123456,
"data": [
{
"url": "https://...",
"revised_prompt": "A photorealistic mountain landscape at sunrise with golden light"
}
]
}
Inference API
Image generation
Generate images from a text prompt
POST
/
api
/
v1
/
images
/
generations
Image generation
curl --request POST \
--url https://app.frogbot.ai/api/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"prompt": "<string>",
"n": 123,
"size": "<string>",
"quality": "<string>",
"response_format": "<string>"
}
'import requests
url = "https://app.frogbot.ai/api/v1/images/generations"
payload = {
"model": "<string>",
"prompt": "<string>",
"n": 123,
"size": "<string>",
"quality": "<string>",
"response_format": "<string>"
}
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({
model: '<string>',
prompt: '<string>',
n: 123,
size: '<string>',
quality: '<string>',
response_format: '<string>'
})
};
fetch('https://app.frogbot.ai/api/v1/images/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://app.frogbot.ai/api/v1/images/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([
'model' => '<string>',
'prompt' => '<string>',
'n' => 123,
'size' => '<string>',
'quality' => '<string>',
'response_format' => '<string>'
]),
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://app.frogbot.ai/api/v1/images/generations"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"n\": 123,\n \"size\": \"<string>\",\n \"quality\": \"<string>\",\n \"response_format\": \"<string>\"\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://app.frogbot.ai/api/v1/images/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"n\": 123,\n \"size\": \"<string>\",\n \"quality\": \"<string>\",\n \"response_format\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.frogbot.ai/api/v1/images/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 \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"n\": 123,\n \"size\": \"<string>\",\n \"quality\": \"<string>\",\n \"response_format\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"created": 1709123456,
"data": [
{
"url": "https://...",
"revised_prompt": "A photorealistic mountain landscape at sunrise with golden light"
}
]
}
Generate images from a text prompt. Supports OpenAI, Google Gemini, and Imagen models.
Authenticate
Use an API key in theAuthorization header.
curl https://app.frogbot.ai/api/v1/images/generations \
-H "Authorization: Bearer $FROGBOT_API_KEY"
Request body
string
required
Image generation model ID to use. See available image models for the full list.Examples:
dall-e-3, imagen-4, imagen-4-ultra, gemini-3-pro-image-previewstring
required
Text description of the image to generate.
integer
default:"1"
Number of images to generate. Most models support
1.string
default:"1024x1024"
Dimensions of the generated image. Supported sizes vary by model.DALL-E 3:
1024x1024, 1024x1792, 1792x1024string
default:"standard"
Image quality. Options:
standard, hd. Supported on DALL-E 3.string
default:"url"
Format of the returned image. Options:
url, b64_json.Response
integer
Unix timestamp of when the image was created.
array
Examples
curl https://app.frogbot.ai/api/v1/images/generations \
-H "Authorization: Bearer $FROGBOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "dall-e-3",
"prompt": "A photorealistic mountain landscape at sunrise",
"size": "1024x1024"
}'
curl https://app.frogbot.ai/api/v1/images/generations \
-H "Authorization: Bearer $FROGBOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "imagen-4",
"prompt": "A photorealistic mountain landscape at sunrise"
}'
from openai import OpenAI
client = OpenAI(
base_url="https://app.frogbot.ai/api/v1",
api_key="YOUR_API_KEY"
)
response = client.images.generate(
model="dall-e-3",
prompt="A photorealistic mountain landscape at sunrise",
size="1024x1024"
)
print(response.data[0].url)
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://app.frogbot.ai/api/v1",
apiKey: "YOUR_API_KEY",
});
const response = await client.images.generate({
model: "dall-e-3",
prompt: "A photorealistic mountain landscape at sunrise",
size: "1024x1024",
});
console.log(response.data[0].url);
{
"created": 1709123456,
"data": [
{
"url": "https://...",
"revised_prompt": "A photorealistic mountain landscape at sunrise with golden light"
}
]
}