GoEnhance API
  1. Text To Image
GoEnhance API
  • GUIDES
    • Quickstart
    • Limits
    • Best Practices
    • Privacy Policy and Terms of Use
  • Basic
    • Get Job Detail
      GET
    • Get User Tokens
      GET
  • Video2Video
    • Generate Video
      POST
    • Model List
      GET
  • ImageFaceSwap
    • Generate Image Face Swap
      POST
  • VideoFaceSwap
    • Generate Video Face Swap
      POST
  • Video Effect
    • AI Video Effect
      POST
    • AI Video Effect List
      GET
  • Text To Image
    • Generate Image
      POST
  1. Text To Image

Generate Image

POST
/api/v1/text2image/generate
Video2Video

Request

Header Params
Authorization
string 
optional
Example:
Bearer xxx
Body Params application/json
args
object 
required
seed
integer 
required
prompt
string 
required
>= 1 characters<= 2000 characters
negative_prompt
string 
optional
>= 1 characters<= 2000 characters
ratio
enum<string> 
required
Allowed values:
1:12:33:23:44:39:1616:9
model
enum<integer> 
required
Allowed values:
234512
batch_size
integer 
required
>= 1<= 8
type
enum<string> 
required
mx-text2img
Allowed value:
mx-text2img
Example
{
  "args": {
    "seed": -1,
    "prompt": "a beautiful girl",
    "negative_prompt": "worst quality,low quality, normal quality, lowres, bad anatomy, bad hands, text, error, nsfw",
    "ratio": "1:1",
    "model": 2,
    "batch_size": 1
  },
  "type": "mx-text2img"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.goenhance.ai/api/v1/text2image/generate' \
--header 'Authorization: Bearer xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
    "args": {
        "seed": -1,
        "prompt": "a beautiful girl",
        "negative_prompt": "worst quality,low quality, normal quality, lowres, bad anatomy, bad hands, text, error, nsfw",
        "ratio": "1:1",
        "model": 2,
        "batch_size": 1
    },
    "type": "mx-text2img"
}'

Responses

🟢200成功
application/json
Body
code
integer 
required
msg
string 
required
data
object 
required
img_uuid
string 
required
Examples
{
  "code": 0,
  "msg": "Success",
  "data": {
    "img_uuid": "c12b656c-747a-44fd-9c80-add79b0c52d5"
  }
}
🟠401Unauthorized
🔴500Server Error
Modified at 2025-02-19 15:52:19
Previous
AI Video Effect List
Built with