Gemini 3 Pro Image VIP Image Generation
curl --request POST \
--url https://toapis.com/v1/images/generations \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"prompt": "<string>",
"size": "<string>",
"n": 123,
"image_urls": [
{
"url": "<string>"
}
],
"metadata": {
"resolution": "<string>"
}
}
'import requests
url = "https://toapis.com/v1/images/generations"
payload = {
"model": "<string>",
"prompt": "<string>",
"size": "<string>",
"n": 123,
"image_urls": [{ "url": "<string>" }],
"metadata": { "resolution": "<string>" }
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
prompt: '<string>',
size: '<string>',
n: 123,
image_urls: [{url: '<string>'}],
metadata: {resolution: '<string>'}
})
};
fetch('https://toapis.com/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://toapis.com/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>',
'size' => '<string>',
'n' => 123,
'image_urls' => [
[
'url' => '<string>'
]
],
'metadata' => [
'resolution' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://toapis.com/v1/images/generations"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"size\": \"<string>\",\n \"n\": 123,\n \"image_urls\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"metadata\": {\n \"resolution\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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://toapis.com/v1/images/generations")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"size\": \"<string>\",\n \"n\": 123,\n \"image_urls\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"metadata\": {\n \"resolution\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://toapis.com/v1/images/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"size\": \"<string>\",\n \"n\": 123,\n \"image_urls\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"metadata\": {\n \"resolution\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_bodyGemini-3-Pro-Image VIP
Gemini 3 Pro Image VIP Image Generation
Gemini 3 Pro Image VIP supports text-to-image and image-to-image generation with up to 14 reference images.
POST
/
v1
/
images
/
generations
Gemini 3 Pro Image VIP Image Generation
curl --request POST \
--url https://toapis.com/v1/images/generations \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"prompt": "<string>",
"size": "<string>",
"n": 123,
"image_urls": [
{
"url": "<string>"
}
],
"metadata": {
"resolution": "<string>"
}
}
'import requests
url = "https://toapis.com/v1/images/generations"
payload = {
"model": "<string>",
"prompt": "<string>",
"size": "<string>",
"n": 123,
"image_urls": [{ "url": "<string>" }],
"metadata": { "resolution": "<string>" }
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
prompt: '<string>',
size: '<string>',
n: 123,
image_urls: [{url: '<string>'}],
metadata: {resolution: '<string>'}
})
};
fetch('https://toapis.com/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://toapis.com/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>',
'size' => '<string>',
'n' => 123,
'image_urls' => [
[
'url' => '<string>'
]
],
'metadata' => [
'resolution' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://toapis.com/v1/images/generations"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"size\": \"<string>\",\n \"n\": 123,\n \"image_urls\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"metadata\": {\n \"resolution\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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://toapis.com/v1/images/generations")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"size\": \"<string>\",\n \"n\": 123,\n \"image_urls\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"metadata\": {\n \"resolution\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://toapis.com/v1/images/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"size\": \"<string>\",\n \"n\": 123,\n \"image_urls\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"metadata\": {\n \"resolution\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_bodyNote for users in mainland China: Please use
https://toapis.cn as the API endpoint (Base URL). Replace https://toapis.com with https://toapis.cn in the examples in this document.Version Options
The reference image count is the total number of input images; it does not represent the number of output images. The three versions use different model IDs, so follow the parameters and examples on the corresponding page.
Current Version
Usemodel: "gemini-3-pro-image-preview-vip" to select VIP, which supports text-to-image and image-to-image or image editing with up to 14 reference images.
It suits edits or multi-image compositions that need 7 to 14 reference images. In multi-image requests, you can explain the purpose of each image in list order.
Requests run asynchronously; after a successful submission, query the result by task ID.
image_urls only supports image URLs and does not accept base64 directly. First use the Upload Image API to get an accessible URL.Authorizations
Body
string
default:"gemini-3-pro-image-preview-vip"
required
Fixed to
gemini-3-pro-image-preview-vip. The standard model name and other aliases do not automatically switch to this VIP route.string
required
Describe the image to generate or edit. When you pass multiple reference images, you can explain the purpose of each image in list order.
string
Image aspect ratio, for example
1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9.integer
default:1
Generates 1 image per request. Use the number
1, not the string "1".object[]
Optional list of reference images, up to 14. Omit this field for text-to-image.
First use the Upload Image API to get an accessible image URL; do not pass base64 directly.
Example:
Show Reference image fields
Show Reference image fields
string
required
A publicly accessible HTTP or HTTPS image URL.
[{"url": "https://example.com/reference-1.png"}, {"url": "https://example.com/reference-2.png"}].
14 is the limit for input reference images, not the number of output images from a single request.Request Example
curl --request POST 'https://toapis.com/v1/images/generations' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "gemini-3-pro-image-preview-vip",
"prompt": "Keep the person from the first image, adopt the background and color palette from the second image, and generate a natural-light portrait.",
"size": "1:1",
"n": 1,
"image_urls": [
{"url": "https://example.com/reference-1.png"},
{"url": "https://example.com/reference-2.png"}
],
"metadata": {"resolution": "2K"}
}'
image_urls and change the prompt.
Querying Results
Theid in the submit response is the task ID. Use the Image Task Status endpoint to get the status and the final image.
Task queries and Webhook callbacks follow the same conventions as the general async image endpoints.