OhMyGPT API
English
  • 中文
  • English
  • 日本語
OhMyGPT
OhMyGPT
English
  • 中文
  • English
  • 日本語
  1. Flux
  • Introduction to this site
  • Change log
  • OpenAI
    • Responses
      • Create model response
      • Get model response
      • Delete model response
      • Cancel response
      • List input items
    • Conversations
      • create conversation
      • Retrieve conversation
      • update conversation
      • delete conversation
      • Create items
      • list items
      • Retrieve item
      • Delete item
    • create completion
      POST
    • TTS text to speech
      POST
    • Embeddings
      POST
    • image generation
      POST
    • image editing
      POST
  • Store
    • List chat completions
      POST
    • Get chat completed
      POST
    • Deletion of chat completed
      POST
  • Claude
    • Anthropic native Completions enterprise commercial API
      POST
    • Anthropic native Messages API
      POST
    • Anthropic native Messages Token Count API
      POST
  • OAuth开放API
    • Introduction to Open OAuth API
    • User authorization page
      GET
    • Code display page
      GET
    • Apply for access_token
      POST
    • Read basic user information
      POST
    • Read user balance information
      POST
    • Charge user fees
      POST
    • Create a Stripe Checkout recharge order for the user
      POST
    • Create a Stripe Invoice recharge order for the user
      POST
    • Call other open APIs
      POST
    • Read user management token through OAuth Token
      POST
    • Update user management token through OAuth Token
      POST
  • other
    • search
      • Google Custom Search API
      • Google Search By Serper
    • Azure
      • Azure text-to-speech
      • Azure gets TTS voice list
  • Override rules
    • Create rules
    • Update rules
    • delete rule
    • Get rules
    • list rules
    • Batch enable/disable
    • Copy rules
    • test rules
    • Get statistics
    • Get restriction configuration
    • Check rule name
    • Batch delete
    • Export rules
    • Import rules
  • image generation
    • other
      • ND image generation API
    • Flux
      • Flux Schnell image generation
        POST
      • Flux Dev image generation
        POST
      • Flux Pro image generation
        POST
      • Flux Pro 1.1 image generation
        POST
      • Flux 1.1 Pro Ultura image generation
        POST
  • Storage service
    • File storage service
    • File upload
    • File information update
    • Delete files
    • User query (pagination)
    • User metadata query (by fileUinqueIds)
    • File download interface (Public file download)
    • File download interface (Private private file download)
    • Obtain public file metadata
  • API KEY management
    • Create new API Key
    • Modify API Key information
    • Query all API Keys of the user
    • Delete the specified API Key
    • Interface for querying user membership expiration date
    • User balance query interface
    • Query the current model magnification interface
  • Archive documents
    • Self-service invoicing system usage documentation
    • Telegram Bot usage documentation
    • Self-built Cloudflare Worker anti-generation tutorial
    • Claude Code forwarding service
    • CodeX forwarding service
    • Introduction to the new website
  • Model list
    GET
  1. Flux

Flux Pro image generation

line1
https://cn2us02.opapi.win
line1
https://cn2us02.opapi.win
POST
/api/v1/ai/draw/flux/pro
Image generation model trained by Black Forest Lab, the effect is great
Parameter description:
Parameter nameTypeDefault valueValue rangeDescription
modelstring"flux-pro"Fixed to "flux-pro"The model name used, currently only "flux-pro" is supported
promptstring--Text prompt used to generate images, required. The content of the prompt will directly affect the content and style of the generated image. You need to describe the image you want to generate as detailed and specific as possible
stepsinteger251~50The number of diffusion steps. The larger the value, the richer the details of the generated image, but the rendering time will be longer. Gains beyond 30 steps will gradually become smaller
guidancenumber32~5Controls the balance between the relevance of generated images to text hints and image quality/diversity. A higher value (such as 4.5) will cause the output to more closely match the prompt, but may reduce the overall quality and diversity of the image. Lower values ​​(such as 2.5) allow more creative freedom, but the resulting image may be less relevant to the prompt. It is recommended to take a value between 3 and 4
intervalnumber21~4Sampling interval, that is, the step size in the original latent space. Increasing the interval will give the model more room to play when generating images, allowing the output images to have more changes in composition, color, detail, and prompt interpretation. Reducing the interval will cause the model to follow the cues more closely, producing more consistent but possibly slightly monotonous images. Interval is similar to the reverse adjustment of guidance. It is recommended that ordinary users set it to 2. Advanced users can adjust it between 1.5 and 3 according to their needs
aspect_ratiostring"1:1""1:1", "16:9", "2:3", "3:2", "4:5", "5:4", "9:16"Generate the aspect ratio of the image, providing some common aspect ratio options, please choose according to your needs
seedinteger--Random seed, the value range is 0 to 2^32-1. If seed is set, the image generated is certain each time. If seed is not set, the images generated each time will be random. Setting the seed allows you to get reproducible generation results
output_formatstring"webp""webp", "jpg", "png"The format of the output image. Three common web-friendly formats are provided. If there are no special needs, it is recommended to use the default webp format
output_qualityinteger800~100The quality of the output image, only valid for jpg and webp formats. 100 represents the best quality, 0 represents the lowest quality. If you want to strike a balance between image quality and file size, it is recommended to set it to around 80
safety_toleranceinteger51~5Content safety tolerance, 1 means the strictest, 5 means the loosest.
response_formatstring"url""url", "b64_json"The returned image data format, the image address is returned in the form of url by default. If set to "b64_json", the image data will be returned directly in base64 encoding in json, saving additional network requests, but the amount of response data will increase

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
Body 参数application/x-www-form-urlencoded

返回响应

🟢200success
application/json
Body

请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://cn2us02.opapi.win/api/v1/ai/draw/flux/pro' \
--header 'Authorization: Bearer <token>' \
--data-urlencode 'model=flux-pro' \
--data-urlencode 'prompt=black forest gateau cake spelling out the words \"OhMyGPT\", tasty, food photography, dynamic shot' \
--data-urlencode 'response_format=b64_json'
响应示例响应示例
{
    "statusCode": 200,
    "message": "Success",
    "data": {
        "outputs": [
            {
                "url": "https://replicate.delivery/czjl/DlkK3QNCx54wPBsON6bGAk9YALq5JoaSieXXcaqPkfLQkNWTA/output.webp",
                "b64_json": "data:image/webp;base64,UklGRiCbAQBXRUJQVlA4IBSbAQAQuwedASoABAAEPm0wlEgkIqktpXa7cbANiWNuUHo3f4zVlURFrzrCerZwIqp5h/dPBP+78Szzf/X+wF/Lf7DxkiA3mGZr9GT/t+lPPgrKC/6rfMKR/kvyG4U9aD/b4zfE/+vzmfaP8vzZ/+b1y/sr2Gf2e9Tnqw/xvpg83P1P/3P1FP61/0uuj9G7zePWc/rv/u/d72vs3n88Pyfr/89nzP+G/1H/h/y/u/aO/c/9n9u/U3+g/p30v6mftv5k/nX9J/7fUR/Mf5//0PS7/K/bfrjvy/Qy+B/yf/m/zPqGfm+h37F/vvYH/pv+J9Mv+d45v5P/mfuF8A/9V/0f7Ve7X/rf/f/f/8P96vdP+tf7n/8f7j4Bv6H/g/Tr////M+EX7tf/3/r/DF+2X/5K7/jInvGXH/N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iTWUSoa6WYYdPP+r0oIizDda6vAMAir71L+qIrqpfrTRhLtP5SYWP0MTO14plZehEqkl7p5BbDNohjoYCBjF4Cw5XXKBjU5nfxTy+0q4Bcz/kQBjA29r/wRgqNl0puJ69B9TdenZr4cDZVy+XmH/0LfeyNDNToskS8OUv/+fBN7Co6cffg9IZUNjEovfsPZecUKU9Au5iVC5vrLLwnhKO/2Hg5T+/XHPtkyVquJO2luMwElF4cr1PKdEYNK5ekbto4RiuGBwovKPMe3j4NVxkq1TH2g+rsuKfjfuTEXsD+cslHoScajgE1i/Cf+14KFU5esiayU+f53D1YVwLiMgsz8xecau1Al6s2oNjmVxX4vPqQMTi3uBSN0hoor5zY5GDCvsojoU/RRJGS7xn85H/wW0n3GadJkDqabw70q+dMr47vLNDgarH4TJFqNJpATGTA8ad+O4fQu3fNp4BLJTbjRdVJn72z7qKI2DuTteyJzOtEO/H5jz0b4ka/0GPtLK3HlGjPo1DsfqIzi+r4uS16jVGhslqgLXS3H7kiQW8sWEm6y+2C7x9KR/RxJ+HTRN/yd/8kE2tpyXTijUgwx/aCeTa16bQYYw8jAbbMNs78AYDKRTtvDVYPAVBWemjDMuRGeho7AahoQUrME3MGcrRKnv3hyiTNyEvtmZL7VnHLFpW9eN+je552yaOoYhcA11NV+7f2g54oPsXRQ2iTkMGkv8PRnEFZp2vnsYATZS2HtSAyN2AvuND+QoP46GjWwVYjTZhV8tdk+T27usYYHh/48yuADVt0Q4xqqs280WagXs6vb9RzD/PU7Q0tR6cf8z9lWJmf69OSXif0bufdbonGW8uXaYopTCrcQp66wrHBfmRzi9xcdhe/0wpF3q1B7qjH8zpLAp3psVGTr11k0m/L4I4Scxom2KvI7VQbWnxERROqhUQOBuH2dl5/cx/HHYJk8WbsIN7iGY90DceSV+nhjvvjLaH3DizlGQKZ6VVDW91dQlk0Lq8fJdb5iaKQ6Ue/MHhwfuzcbxjOXKD
修改于 2025-10-15 08:07:30
上一页
Flux Dev image generation
下一页
Flux Pro 1.1 image generation
Built with