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 Dev image generation

line1
https://cn2us02.opapi.win
line1
https://cn2us02.opapi.win
POST
/api/v1/ai/draw/flux/dev
Image generation model trained by Black Forest Lab, the effect is great
Parameter description:
Parameter nameTypeDefault valueValue rangeDescription
modelstring"flux-dev"Fixed to "flux-dev"The model name used, currently only "flux-dev" 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
imagestring--Input image for image to image mode. The output image will have the same aspect ratio as this image. Images need to be provided in the form of URI, supporting http/https URL or data URL (base64 encoded image data)
prompt_strengthnumber0.80~1In image-to-image mode, the strength of the text prompt relative to the input image. When the value is 1, the information in the input image will be completely replaced, that is, the generated image has nothing to do with the input image. When the value is 0, the input image will be completely retained and the text prompt will have no effect. The recommended value is between 0.6~0.9
num_outputsinteger11~4Number of images to generate
aspect_ratiostring"1:1""1:1", "16:9", "21:9", "2:3", "3:2", "4:5", "5:4", "9:16", "9:21"Generate the aspect ratio of the image, providing some common aspect ratio options, please choose according to your needs
num_inference_stepsinteger501~50The number of inference steps for sampling. The larger the number of inference steps, the higher the image quality, but the longer the generation time. The recommended setting is between 28~50
guidancenumber3.50~10Controls the balance between the relevance of generated images to text hints and image quality/diversity. Valid in flux-dev model, ignored in flux-schnell model. A higher value (such as 7) 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) 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 5
seedinteger-0~2^32-1Random seed. 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
disable_safety_checkerbooleantruetrue, falseWhether to disable the content safety checker. The default is true, which means no content security check is performed to minimize the impact of the filter on user use.
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/dev' \
--header 'Authorization: Bearer <token>' \
--data-urlencode 'model=flux-dev' \
--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/yhqm/xXbDDptSA7oAD9UrEp8u4nkjpIUi7lvllWNzt9btzEJQvi1E/out-0.webp",
                "b64_json": "data:image/webp;base64,UklGRl5OAQBXRUJQVlA4IFJOAQCQ5QSdASoABAAEPm00lUgkIqSnpPnJuPANiWVu/5O7BfQ6h/KpY66PWJOIeqnS+jK0pfaul+cIbVb2rpx/X/0+51k34f/e/0Xphcn99n0v8N/nvev/t98nv//e8xfqfzg/9D1l/0T/cewn+yX00fSP/3+vT/G/+f1Xfuj+4Hu0/+r9zfgN/XfUp/qf/J///ZKeiv5un/29pj+u/+T92va9/93Z/9LP5T/w/OZ8t/o/+t4Y+Wf3v+//5//of4r3Uf+b/MeXj3j+5/8/+p9S/59+WP4/+L/0f7OfMz+4/8X+j8j/ll/v/5P8tvkI/Kv6R/t/75+THx5ffftv/w/Jk3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ogyQQIxJYg52KFS
修改于 2025-10-15 08:07:30
上一页
Flux Schnell image generation
下一页
Flux Pro image generation
Built with