ai-gateway
    ai-gateway
    • Suno
      • Suno Generate
        POST
      • Suno Feed
        GET
      • Suno Concat
        POST
      • Suno Generate (Extend)
        POST
    • Stable Diffusion
      • Stable Diffusion 文生图
        POST
      • Stable Diffusion 图生图
        POST
      • ReActor image
        POST
    • Create chat completion
      POST
    • Create chat completion with stream
      POST
    • Create image
      POST
    • Create speech
      POST
    • Create transcription
      POST
    • asr
      POST
    • asr Copy
      POST
    • Create transcription Copy
      POST

      Create image

      POST
      /v1/images/generations

      请求参数

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

      示例
      {
          "prompt": "一条狗和一只猫在玩耍",
          "model": "dall-e-3"
      }

      请求示例代码

      Shell
      JavaScript
      Java
      Swift
      Go
      PHP
      Python
      HTTP
      C
      C#
      Objective-C
      Ruby
      OCaml
      Dart
      R
      请求示例请求示例
      Shell
      JavaScript
      Java
      Swift
      curl --location --request POST 'https://api.aigateway.work/v1/images/generations' \
      --header 'Authorization: Bearer <token>' \
      --header 'Content-Type: application/json' \
      --data-raw '{
          "prompt": "一条狗和一只猫在玩耍",
          "model": "dall-e-3"
      }'

      返回响应

      🟢200成功
      application/json
      Body

      示例
      {
          "created": 1708585321,
          "data": [
              {
                  "url": "https://filesystem.site/cdn/20240222/tLnwCLUpYbycUbXW8dX1LUmyMQhWh4.webp"
              }
          ]
      }
      修改于 2024-03-05 10:37:02
      上一页
      Create chat completion with stream
      下一页
      Create speech
      Built with