Text-to-Image
curl --request POST \
--url https://geoff.ai/api/v1/image/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Stack-Id: <x-stack-id>' \
--data '
{
"prompt": "A small ceramic teapot on a pale blue table",
"tool": "auto"
}
'import requests
url = "https://geoff.ai/api/v1/image/generate"
payload = {
"prompt": "A small ceramic teapot on a pale blue table",
"tool": "auto"
}
headers = {
"X-Stack-Id": "<x-stack-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Stack-Id': '<x-stack-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({prompt: 'A small ceramic teapot on a pale blue table', tool: 'auto'})
};
fetch('https://geoff.ai/api/v1/image/generate', 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://geoff.ai/api/v1/image/generate",
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' => 'A small ceramic teapot on a pale blue table',
'tool' => 'auto'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Stack-Id: <x-stack-id>"
],
]);
$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://geoff.ai/api/v1/image/generate"
payload := strings.NewReader("{\n \"prompt\": \"A small ceramic teapot on a pale blue table\",\n \"tool\": \"auto\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Stack-Id", "<x-stack-id>")
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://geoff.ai/api/v1/image/generate")
.header("X-Stack-Id", "<x-stack-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"A small ceramic teapot on a pale blue table\",\n \"tool\": \"auto\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://geoff.ai/api/v1/image/generate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Stack-Id"] = '<x-stack-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"A small ceramic teapot on a pale blue table\",\n \"tool\": \"auto\"\n}"
response = http.request(request)
puts response.read_body{
"data": {},
"trace_id": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "Check the request parameters."
}
}{
"error": {
"code": "unauthorized",
"message": "Supply a valid API key."
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Wait before sending another request."
}
}{
"error": {
"code": "request_failed",
"message": "The request could not be completed."
}
}Image Generation
Text-to-Image
Generate an image from a text prompt.
POST
/
v1
/
image
/
generate
Text-to-Image
curl --request POST \
--url https://geoff.ai/api/v1/image/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Stack-Id: <x-stack-id>' \
--data '
{
"prompt": "A small ceramic teapot on a pale blue table",
"tool": "auto"
}
'import requests
url = "https://geoff.ai/api/v1/image/generate"
payload = {
"prompt": "A small ceramic teapot on a pale blue table",
"tool": "auto"
}
headers = {
"X-Stack-Id": "<x-stack-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Stack-Id': '<x-stack-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({prompt: 'A small ceramic teapot on a pale blue table', tool: 'auto'})
};
fetch('https://geoff.ai/api/v1/image/generate', 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://geoff.ai/api/v1/image/generate",
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' => 'A small ceramic teapot on a pale blue table',
'tool' => 'auto'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Stack-Id: <x-stack-id>"
],
]);
$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://geoff.ai/api/v1/image/generate"
payload := strings.NewReader("{\n \"prompt\": \"A small ceramic teapot on a pale blue table\",\n \"tool\": \"auto\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Stack-Id", "<x-stack-id>")
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://geoff.ai/api/v1/image/generate")
.header("X-Stack-Id", "<x-stack-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"A small ceramic teapot on a pale blue table\",\n \"tool\": \"auto\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://geoff.ai/api/v1/image/generate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Stack-Id"] = '<x-stack-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"A small ceramic teapot on a pale blue table\",\n \"tool\": \"auto\"\n}"
response = http.request(request)
puts response.read_body{
"data": {},
"trace_id": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "Check the request parameters."
}
}{
"error": {
"code": "unauthorized",
"message": "Supply a valid API key."
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Wait before sending another request."
}
}{
"error": {
"code": "request_failed",
"message": "The request could not be completed."
}
}Set
For example, use
tool to choose a capability below, or omit it for automatic selection. Supply additional inputs in parameters; keep prompt at the top level.
Tools
| Tool | Capability | Required additional inputs |
|---|---|---|
auto | Choose a tool automatically for the prompt. | None |
generate_image_10 | Generate detailed images with fast turnaround. | None |
generate_image_11 | Generate detailed images from text or reference images. | None |
generate_image_12 | Generate photorealistic images with composition controls and enhanced detail. | None |
generate_image_13 | Generate detailed images that closely follow a text prompt. | None |
generate_image_15 | Generate images with optional size, quality, and seed controls. | None |
generate_image_15_edit | Edit an image using a text prompt while preserving its visual structure. | image |
generate_image_16 | Generate images with legible text, crisp typography, and precise layouts. | None |
generate_image_17 | Generate expressive images guided by style, mood, and creative direction. | None |
generate_image_18 | Generate high-fidelity images with precise text rendering and strong prompt adherence. | None |
generate_image_5 | Generate detailed images from a text prompt. | None |
generate_image_6 | Generate images with accurate text, symbols, and page layouts. | None |
generate_image_7 | Generate images with legible text and crisp typography. | None |
generate_image_7_edit | Edit images while preserving text accuracy and fine typographic detail. | input_urls |
generate_image_8 | Generate detailed images that follow the prompt and include accurate text. | None |
generate_image_edit | Edit an existing image by applying a text-guided transformation. | image |
generate_image_edit_14 | Refine an image with a text-guided edit. | image |
generate_image_edit_5 | Edit a single image using a text prompt. | image |
generate_image_edit_pro | Edit images using a text description and optional reference images. | None |
generate_image_face_unlocked_1 | Replace a face while preserving identity and scene detail. | image |
generate_image_gram | Generate photorealistic portraits with refined faces, eyes, and fine detail. | None |
parameters for reference images or output settings supported by your selected tool.Authorizations
Bearer API_key, can be found in Account Management > API Keys.
Headers
Supplied automatically by the documentation playground.
Body
application/json
Describe what to create.
Minimum string length:
1Optional tool selection.
Available options:
auto, generate_image_10, generate_image_11, generate_image_12, generate_image_13, generate_image_15, generate_image_15_edit, generate_image_16, generate_image_17, generate_image_18, generate_image_5, generate_image_6, generate_image_7, generate_image_7_edit, generate_image_8, generate_image_edit, generate_image_edit_14, generate_image_edit_5, generate_image_edit_pro, generate_image_face_unlocked_1, generate_image_gram Additional inputs accepted by the selected tool.
Optional caller idempotency key; a retry with the same key returns the same operation.
Maximum string length:
240