curl --request POST \
--url https://api.goenhance.ai/api/v1/images/generations \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "You are an OC generator. Create a character based on: a stoic knight with silver hair.\nReturn ONLY a JSON object: {\"role_name\":\"\",\"appearance\":\"\",\"personality\":\"\",\"oc_prompt\":\"\",\"oc_ratio\":\"3:4\"}\nThe oc_prompt must be an English image prompt starting with \"Anime style, Single character, full body, front view\".",
"image_render_model": "seedream",
"ratio": "3:4"
}
'import requests
url = "https://api.goenhance.ai/api/v1/images/generations"
payload = {
"prompt": "You are an OC generator. Create a character based on: a stoic knight with silver hair.
Return ONLY a JSON object: {\"role_name\":\"\",\"appearance\":\"\",\"personality\":\"\",\"oc_prompt\":\"\",\"oc_ratio\":\"3:4\"}
The oc_prompt must be an English image prompt starting with \"Anime style, Single character, full body, front view\".",
"image_render_model": "seedream",
"ratio": "3:4"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: 'You are an OC generator. Create a character based on: a stoic knight with silver hair.\nReturn ONLY a JSON object: {"role_name":"","appearance":"","personality":"","oc_prompt":"","oc_ratio":"3:4"}\nThe oc_prompt must be an English image prompt starting with "Anime style, Single character, full body, front view".',
image_render_model: 'seedream',
ratio: '3:4'
})
};
fetch('https://api.goenhance.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://api.goenhance.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([
'prompt' => 'You are an OC generator. Create a character based on: a stoic knight with silver hair.
Return ONLY a JSON object: {"role_name":"","appearance":"","personality":"","oc_prompt":"","oc_ratio":"3:4"}
The oc_prompt must be an English image prompt starting with "Anime style, Single character, full body, front view".',
'image_render_model' => 'seedream',
'ratio' => '3:4'
]),
CURLOPT_HTTPHEADER => [
"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://api.goenhance.ai/api/v1/images/generations"
payload := strings.NewReader("{\n \"prompt\": \"You are an OC generator. Create a character based on: a stoic knight with silver hair.\\nReturn ONLY a JSON object: {\\\"role_name\\\":\\\"\\\",\\\"appearance\\\":\\\"\\\",\\\"personality\\\":\\\"\\\",\\\"oc_prompt\\\":\\\"\\\",\\\"oc_ratio\\\":\\\"3:4\\\"}\\nThe oc_prompt must be an English image prompt starting with \\\"Anime style, Single character, full body, front view\\\".\",\n \"image_render_model\": \"seedream\",\n \"ratio\": \"3:4\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.goenhance.ai/api/v1/images/generations")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"You are an OC generator. Create a character based on: a stoic knight with silver hair.\\nReturn ONLY a JSON object: {\\\"role_name\\\":\\\"\\\",\\\"appearance\\\":\\\"\\\",\\\"personality\\\":\\\"\\\",\\\"oc_prompt\\\":\\\"\\\",\\\"oc_ratio\\\":\\\"3:4\\\"}\\nThe oc_prompt must be an English image prompt starting with \\\"Anime style, Single character, full body, front view\\\".\",\n \"image_render_model\": \"seedream\",\n \"ratio\": \"3:4\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goenhance.ai/api/v1/images/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"You are an OC generator. Create a character based on: a stoic knight with silver hair.\\nReturn ONLY a JSON object: {\\\"role_name\\\":\\\"\\\",\\\"appearance\\\":\\\"\\\",\\\"personality\\\":\\\"\\\",\\\"oc_prompt\\\":\\\"\\\",\\\"oc_ratio\\\":\\\"3:4\\\"}\\nThe oc_prompt must be an English image prompt starting with \\\"Anime style, Single character, full body, front view\\\".\",\n \"image_render_model\": \"seedream\",\n \"ratio\": \"3:4\"\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"msg": "Success",
"data": {
"img_uuid": "c12b656c-747a-44fd-9c80-add79b0c52d5",
"cost": 5.82
}
}OC Maker
Two-stage generation in a single request: an LLM turns your prompt into a structured character sheet, then that result is rendered into an image.
You supply the full LLM prompt. No style presets or prompt templates are applied server-side — compose whatever prompt you need.
Required output contract: your prompt MUST instruct the model to return a JSON object containing an oc_prompt field. That field becomes the image prompt. If the model does not return parseable JSON with oc_prompt, the job fails.
Optionally include oc_ratio in that JSON to let the model pick the aspect ratio; the ratio request field overrides it.
Pricing: 1 token per request (= $0.02). Covers both the text and image stages.
Returns an img_uuid; poll GET /api/v1/jobs/detail (or use custom_callback_url) to get the result. The result contains two entries: the full LLM JSON (type: "json") and the rendered image (type: "image", image_type: "main_view").
curl --request POST \
--url https://api.goenhance.ai/api/v1/images/generations \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "You are an OC generator. Create a character based on: a stoic knight with silver hair.\nReturn ONLY a JSON object: {\"role_name\":\"\",\"appearance\":\"\",\"personality\":\"\",\"oc_prompt\":\"\",\"oc_ratio\":\"3:4\"}\nThe oc_prompt must be an English image prompt starting with \"Anime style, Single character, full body, front view\".",
"image_render_model": "seedream",
"ratio": "3:4"
}
'import requests
url = "https://api.goenhance.ai/api/v1/images/generations"
payload = {
"prompt": "You are an OC generator. Create a character based on: a stoic knight with silver hair.
Return ONLY a JSON object: {\"role_name\":\"\",\"appearance\":\"\",\"personality\":\"\",\"oc_prompt\":\"\",\"oc_ratio\":\"3:4\"}
The oc_prompt must be an English image prompt starting with \"Anime style, Single character, full body, front view\".",
"image_render_model": "seedream",
"ratio": "3:4"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: 'You are an OC generator. Create a character based on: a stoic knight with silver hair.\nReturn ONLY a JSON object: {"role_name":"","appearance":"","personality":"","oc_prompt":"","oc_ratio":"3:4"}\nThe oc_prompt must be an English image prompt starting with "Anime style, Single character, full body, front view".',
image_render_model: 'seedream',
ratio: '3:4'
})
};
fetch('https://api.goenhance.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://api.goenhance.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([
'prompt' => 'You are an OC generator. Create a character based on: a stoic knight with silver hair.
Return ONLY a JSON object: {"role_name":"","appearance":"","personality":"","oc_prompt":"","oc_ratio":"3:4"}
The oc_prompt must be an English image prompt starting with "Anime style, Single character, full body, front view".',
'image_render_model' => 'seedream',
'ratio' => '3:4'
]),
CURLOPT_HTTPHEADER => [
"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://api.goenhance.ai/api/v1/images/generations"
payload := strings.NewReader("{\n \"prompt\": \"You are an OC generator. Create a character based on: a stoic knight with silver hair.\\nReturn ONLY a JSON object: {\\\"role_name\\\":\\\"\\\",\\\"appearance\\\":\\\"\\\",\\\"personality\\\":\\\"\\\",\\\"oc_prompt\\\":\\\"\\\",\\\"oc_ratio\\\":\\\"3:4\\\"}\\nThe oc_prompt must be an English image prompt starting with \\\"Anime style, Single character, full body, front view\\\".\",\n \"image_render_model\": \"seedream\",\n \"ratio\": \"3:4\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.goenhance.ai/api/v1/images/generations")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"You are an OC generator. Create a character based on: a stoic knight with silver hair.\\nReturn ONLY a JSON object: {\\\"role_name\\\":\\\"\\\",\\\"appearance\\\":\\\"\\\",\\\"personality\\\":\\\"\\\",\\\"oc_prompt\\\":\\\"\\\",\\\"oc_ratio\\\":\\\"3:4\\\"}\\nThe oc_prompt must be an English image prompt starting with \\\"Anime style, Single character, full body, front view\\\".\",\n \"image_render_model\": \"seedream\",\n \"ratio\": \"3:4\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goenhance.ai/api/v1/images/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"You are an OC generator. Create a character based on: a stoic knight with silver hair.\\nReturn ONLY a JSON object: {\\\"role_name\\\":\\\"\\\",\\\"appearance\\\":\\\"\\\",\\\"personality\\\":\\\"\\\",\\\"oc_prompt\\\":\\\"\\\",\\\"oc_ratio\\\":\\\"3:4\\\"}\\nThe oc_prompt must be an English image prompt starting with \\\"Anime style, Single character, full body, front view\\\".\",\n \"image_render_model\": \"seedream\",\n \"ratio\": \"3:4\"\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"msg": "Success",
"data": {
"img_uuid": "c12b656c-747a-44fd-9c80-add79b0c52d5",
"cost": 5.82
}
}Prompt contract
This endpoint runs two stages: a language model turns your prompt into a structured character sheet, then that sheet is rendered into an image. Your prompt must instruct the model to return a JSON object containing anoc_prompt field —
that field becomes the image prompt. If the model returns anything that cannot be parsed as JSON,
or the JSON has no oc_prompt, the job fails.
Create a character based on: a stoic knight with silver hair.
Return ONLY a JSON object in this format:
{"role_name":"","appearance":"","personality":"","oc_prompt":"","oc_ratio":"3:4"}
"oc_prompt" must be an English image prompt starting with
"Anime style, Single character, full body, front view".
role_name, personality, character_backstory, …) are passed
through to the result untouched, so you can shape the character sheet however you like.
oc_ratio is optional — it lets the model choose the aspect ratio. The ratio request field
overrides it, and 3:4 is used when neither is present.
Result
Unlike the other image endpoints, the result array contains two entries: the full JSON from the text stage, then the rendered image. PollGET /api/v1/jobs/detail or use custom_callback_url.
{
"code": 0,
"msg": "Success",
"data": {
"img_uuid": "0f1b8c2e-4a7d-4c31-9f28-6de4a1b9c503",
"status": "success",
"type": "oc-maker",
"start_time": "2026-08-02T09:14:22.108Z",
"end_time": "2026-08-02T09:15:04.771Z",
"model_id": "-1",
"json": [
{
"type": "json",
"value": {
"role_name": "Sir Aldric",
"appearance": "Tall knight with long silver hair and a scarred jaw",
"personality": "Stoic, loyal, slow to anger",
"oc_prompt": "Anime style, Single character, full body, front view, a tall knight with long silver hair...",
"oc_ratio": "3:4"
},
"duration": 28.4,
"link_expired_at": "2026-08-03T09:15:04.771Z"
},
{
"type": "image",
"image_type": "main_view",
"value": "https://cdn3.goenhance.ai/user/seedream/9dfdb4b5-7ef7-4fe7-93ff-b9eb76cc431d.jpg",
"duration": 28.4,
"link_expired_at": "2026-08-03T09:15:04.771Z"
}
],
"job_type": "oc-maker"
}
}
value of the type: "json" entry is an object, not a URL string — the only endpoint
where this happens. Read the image from the entry with type: "image" rather than assuming
json[0] is the image.link_expired_atapplies to the image link. It is also present on the JSON entry, where it has no meaning — ignore it there.durationmeasures the image stage only, not the text stage, so it under-reports total latency.- Both stages share one
img_uuidand are billed once. A failure in either stage fails the whole job and refunds the tokens.
Headers
Body
Model name. Must be oc-maker.
oc-maker Full prompt for the text stage. Must instruct the model to return a JSON object containing an oc_prompt field.
1 - 8000Rendering backend used for the image stage.
seedream, gpt-image-2 Optional system prompt for the text stage. Defaults to a generic assistant prompt.
4000Optional LLM model id for the text stage. Defaults to gemini-3-pro-preview.
100Optional. Aspect ratio of the generated image. Overrides oc_ratio from the LLM output; defaults to 3:4.
1:1, 2:3, 3:2, 4:3, 3:4, 16:9, 9:16 Optional. A publicly accessible HTTPS URL. When the task status changes (processing / success / failed), GoEnhance sends a POST request to this URL. The request body is identical to the response of GET /api/v1/jobs/detail. If your server does not respond with HTTP 200, the notification is retried up to 3 times, with a 3-second timeout per attempt.
"https://your-server.com/goenhance/callback"
