跳转到主要内容
GPT图片生成文档:https://developers.openai.com/api/reference/resources/images/methods/generate 豆包系图片生成文档:https://www.volcengine.com/docs/82379/1541523?lang=zh

Endpoint

POST /v1/images/generations
分组: 图片 / openai

Headers

  • Authorization: 必填 示例: Bearer sk-FQCysi51wHAAjUPW8i9JOfX4GA6GoExqj1BvHSPzVwSsdfbg
  • Content-Type: 必填 示例: application/json

Request example

{
  "model": "gpt-image-1",
  "prompt": "Programmer cartoon avatar",
  "size": "1024x1024"
}

Responses

  • 200: 成功

OpenAPI specification

openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/images/generations:
    post:
      summary: GPT图片生成
      deprecated: false
      description: >-
        GPT图片生成文档:https://developers.openai.com/api/reference/resources/images/methods/generate

        豆包系图片生成文档:https://www.volcengine.com/docs/82379/1541523?lang=zh
      tags:
        - 图片/openai
      parameters:
        - name: Authorization
          in: header
          description: ''
          required: true
          example: Bearer sk-FQCysi51wHAAjUPW8i9JOfX4GA6GoExqj1BvHSPzVwSsdfbg
          schema:
            type: string
        - name: Content-Type
          in: header
          description: ''
          required: true
          example: application/json
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
                  description: >-
                    模型gpt-image-1、doubao-seedream-4-0-250828、doubao-seedream-4-5-251128
                prompt:
                  type: string
              required:
                - model
                - prompt
              x-apifox-orders:
                - model
                - prompt
            example:
              model: gpt-image-1
              prompt: Programmer cartoon avatar
              size: 1024x1024
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
          headers: {}
          x-apifox-name: 成功
      security: []
      x-apifox-folder: 图片/openai
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-386885375-run
components:
  schemas: {}
  securitySchemes: {}
servers: []
security: []