# 图像生成 国产模型【推荐】 

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/chat/completions:
    post:
      summary: '图像生成 国产模型【推荐】 '
      deprecated: false
      description: |-
        **本图像生成接口采用智谱清言图像生成接口，生成效果较好，中文支持较好，速度较快。



        ### token获取方式：
        访问公众号《冰橙云》进入菜单冰橙AI助手后，访问右上角 / 个人（首次访问免费赠送15000字符，可通过充值增加字符数）可查看 token
        访问：https://yewu.bcwhkj.cn 》 个人 》Token令牌 获取（首次访问赠送15000字符）

        ### 价格说明：
        ◆ 图形生成每张消耗5000字符，因接口特殊性，如无返回内容将不退还字符


        ### 特别注意：
        ◆ 图形生成接口生成的图片路径为非永久性存在，请自行存储。
      tags:
        - 文生图 图像生成
        - 公开
      parameters:
        - name: Content-Type
          in: header
          description: 固定值
          required: false
          example: application/json
          schema:
            type: string
        - name: Authorization
          in: header
          description: token要更换为个人自己的TOKEN
          example: Bearer token
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                prompt:
                  type: string
                  description: 要生成的需求文字
                model:
                  type: string
                  description: 固定值
                  enum:
                    - draw
                  x-apifox:
                    enumDescriptions:
                      draw: ''
              required:
                - prompt
                - model
              x-apifox-orders:
                - prompt
                - model
            example:
              prompt: 画一个钢铁侠
              model: bc-Img
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  created:
                    type: integer
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        url:
                          type: string
                      x-apifox-orders:
                        - url
                required:
                  - created
                  - data
                x-apifox-orders:
                  - created
                  - data
              examples:
                '1':
                  summary: 成功示例
                  value:
                    created: 1744165828
                    data:
                      - url: >-
                          https://aigc-files.bigmodel.cn/api/cogview/20250409103028542dffec636745b3_0.png
                '2':
                  summary: 密钥错误
                  value:
                    codes: 900
                    mess: 密钥错误或已过期，请通过微信访问yewu.bcwhkj.cn个人中心获取
                    data: token
                '3':
                  summary: 提交内容不合规
                  value:
                    error:
                      code: content_policy_violation
                      message: >-
                        Your request was rejected as a result of our safety
                        system. 
                      param: null
                      type: invalid_request_error
                '4':
                  summary: 额度不足
                  value:
                    codes: 300
                    mess: 当前额度不足，请充值后继续使用
                    data: ''
                '5':
                  summary: 异常示例 N值超过限制
                  value:
                    error:
                      code: null
                      message: You must provide n=1 for this model.
                      param: null
                      type: invalid_request_error
          headers: {}
          x-apifox-name: 成功
      security: []
      x-apifox-folder: 文生图 图像生成
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/3216478/apis/api-188573322-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://yewu.bcwhkj.cn
    description: 正式环境
security: []

```
