curl --request POST \
--url https://api.goenhance.ai/api/v1/images/generations \
--header 'Content-Type: application/json' \
--data '
{
"model": "moss-image",
"prompt": "A hand-drawn chalkboard cafe menu on a brick wall. Title in large white chalk letters: \"MORNING LIGHT\". Two columns: \"COFFEE\" Americano 18, Latte 24; \"DESSERT\" Croissant 16.",
"ratio": "16:9",
"image_size": "1K"
}
'import requests
url = "https://api.goenhance.ai/api/v1/images/generations"
payload = {
"model": "moss-image",
"prompt": "A hand-drawn chalkboard cafe menu on a brick wall. Title in large white chalk letters: \"MORNING LIGHT\". Two columns: \"COFFEE\" Americano 18, Latte 24; \"DESSERT\" Croissant 16.",
"ratio": "16:9",
"image_size": "1K"
}
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({
model: 'moss-image',
prompt: 'A hand-drawn chalkboard cafe menu on a brick wall. Title in large white chalk letters: "MORNING LIGHT". Two columns: "COFFEE" Americano 18, Latte 24; "DESSERT" Croissant 16.',
ratio: '16:9',
image_size: '1K'
})
};
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([
'model' => 'moss-image',
'prompt' => 'A hand-drawn chalkboard cafe menu on a brick wall. Title in large white chalk letters: "MORNING LIGHT". Two columns: "COFFEE" Americano 18, Latte 24; "DESSERT" Croissant 16.',
'ratio' => '16:9',
'image_size' => '1K'
]),
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 \"model\": \"moss-image\",\n \"prompt\": \"A hand-drawn chalkboard cafe menu on a brick wall. Title in large white chalk letters: \\\"MORNING LIGHT\\\". Two columns: \\\"COFFEE\\\" Americano 18, Latte 24; \\\"DESSERT\\\" Croissant 16.\",\n \"ratio\": \"16:9\",\n \"image_size\": \"1K\"\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 \"model\": \"moss-image\",\n \"prompt\": \"A hand-drawn chalkboard cafe menu on a brick wall. Title in large white chalk letters: \\\"MORNING LIGHT\\\". Two columns: \\\"COFFEE\\\" Americano 18, Latte 24; \\\"DESSERT\\\" Croissant 16.\",\n \"ratio\": \"16:9\",\n \"image_size\": \"1K\"\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 \"model\": \"moss-image\",\n \"prompt\": \"A hand-drawn chalkboard cafe menu on a brick wall. Title in large white chalk letters: \\\"MORNING LIGHT\\\". Two columns: \\\"COFFEE\\\" Americano 18, Latte 24; \\\"DESSERT\\\" Croissant 16.\",\n \"ratio\": \"16:9\",\n \"image_size\": \"1K\"\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"msg": "Success",
"data": {
"img_uuid": "c12b656c-747a-44fd-9c80-add79b0c52d5",
"cost": 1
}
}MOSS-Image
MOSS-Image text to image. The model is built for layout and long text, so posters, menus, signs and infographics come out with accurate English and Chinese lettering. Always returns a single PNG. Image editing is not available for this model; requests with image_list are rejected.
Pricing — flat per image by resolution tier:
| image_size | Tokens | USD |
|---|---|---|
| 1K (about 1 MP, default) | 1 | $0.02 |
| 2K (about 4 MP) | 4 | $0.08 |
Text in the image — put the exact words you want rendered in quotes, for example a sign that reads "OPEN 24 HOURS". Chinese and English can be mixed in one prompt. Long prompts (up to 4000 characters) are fine and help with dense layouts. Text you do not specify may come out as filler.
Timing — about 15 to 20 seconds of processing for 1K, and about 1 to 2 minutes for 2K, plus queue time.
curl --request POST \
--url https://api.goenhance.ai/api/v1/images/generations \
--header 'Content-Type: application/json' \
--data '
{
"model": "moss-image",
"prompt": "A hand-drawn chalkboard cafe menu on a brick wall. Title in large white chalk letters: \"MORNING LIGHT\". Two columns: \"COFFEE\" Americano 18, Latte 24; \"DESSERT\" Croissant 16.",
"ratio": "16:9",
"image_size": "1K"
}
'import requests
url = "https://api.goenhance.ai/api/v1/images/generations"
payload = {
"model": "moss-image",
"prompt": "A hand-drawn chalkboard cafe menu on a brick wall. Title in large white chalk letters: \"MORNING LIGHT\". Two columns: \"COFFEE\" Americano 18, Latte 24; \"DESSERT\" Croissant 16.",
"ratio": "16:9",
"image_size": "1K"
}
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({
model: 'moss-image',
prompt: 'A hand-drawn chalkboard cafe menu on a brick wall. Title in large white chalk letters: "MORNING LIGHT". Two columns: "COFFEE" Americano 18, Latte 24; "DESSERT" Croissant 16.',
ratio: '16:9',
image_size: '1K'
})
};
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([
'model' => 'moss-image',
'prompt' => 'A hand-drawn chalkboard cafe menu on a brick wall. Title in large white chalk letters: "MORNING LIGHT". Two columns: "COFFEE" Americano 18, Latte 24; "DESSERT" Croissant 16.',
'ratio' => '16:9',
'image_size' => '1K'
]),
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 \"model\": \"moss-image\",\n \"prompt\": \"A hand-drawn chalkboard cafe menu on a brick wall. Title in large white chalk letters: \\\"MORNING LIGHT\\\". Two columns: \\\"COFFEE\\\" Americano 18, Latte 24; \\\"DESSERT\\\" Croissant 16.\",\n \"ratio\": \"16:9\",\n \"image_size\": \"1K\"\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 \"model\": \"moss-image\",\n \"prompt\": \"A hand-drawn chalkboard cafe menu on a brick wall. Title in large white chalk letters: \\\"MORNING LIGHT\\\". Two columns: \\\"COFFEE\\\" Americano 18, Latte 24; \\\"DESSERT\\\" Croissant 16.\",\n \"ratio\": \"16:9\",\n \"image_size\": \"1K\"\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 \"model\": \"moss-image\",\n \"prompt\": \"A hand-drawn chalkboard cafe menu on a brick wall. Title in large white chalk letters: \\\"MORNING LIGHT\\\". Two columns: \\\"COFFEE\\\" Americano 18, Latte 24; \\\"DESSERT\\\" Croissant 16.\",\n \"ratio\": \"16:9\",\n \"image_size\": \"1K\"\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"msg": "Success",
"data": {
"img_uuid": "c12b656c-747a-44fd-9c80-add79b0c52d5",
"cost": 1
}
}Headers
Body
Model name. Must be moss-image.
moss-image What to generate. Required. Text you put in quotes is rendered in the image as written, in English or Chinese.
4000Aspect ratio. auto means 1:1.
auto, 1:1, 2:3, 3:2, 3:4, 4:3, 9:16, 16:9, 21:9 Resolution tier, also the price tier. 1K is about 1 megapixel, 2K about 4 megapixels. Case-insensitive.
1K, 2K Optional. Fixing the seed makes results more reproducible.
0 <= x <= 2147483647Optional. 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"
