# 对话生成 GPT-4o-mini 多模态-图像识别

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/chat/completions:
    post:
      summary: 对话生成 GPT-4o-mini 多模态-图像识别
      deprecated: false
      description: |-
        **冰橙API提供与OPENAI官方的API兼容的接口方式，方便国内开发者进行与OPENAI的CHATGPT的接口对接服务**



        :::highlight purple 📌
        对话生成  建议采用SSE方式（流式），对话响应速度更快
        :::


        ### token获取方式：
        - 访问公众号《冰橙云》进入菜单冰橙AI助手后，访问右上角 / API密钥 可查看 token
        - 访问：https://yewu.bcwhkj.cn 》 个人 》API密钥 》Token令牌 
      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:
                model:
                  type: string
                messages:
                  type: array
                  items:
                    type: object
                    properties:
                      role:
                        type: string
                      content:
                        type: array
                        items:
                          type: object
                          properties:
                            type:
                              type: string
                            text:
                              type: string
                            image_url:
                              type: object
                              properties:
                                url:
                                  type: string
                              required:
                                - url
                              x-apifox-orders:
                                - url
                          required:
                            - type
                          x-apifox-orders:
                            - type
                            - text
                            - image_url
                    x-apifox-orders:
                      - role
                      - content
                max_tokens:
                  type: integer
              required:
                - model
                - messages
              x-apifox-orders:
                - model
                - messages
                - max_tokens
            example:
              model: gpt-4o-mini
              messages:
                - role: user
                  content:
                    - type: text
                      text: 这是什么图片?
                    - type: image_url
                      image_url:
                        url: >-
                          https://vkceyugu.cdn.bspapp.com/VKCEYUGU-908027cd-0849-4303-ae20-d3bed9830e3a/25eaeef6-ccce-4b08-9caa-de04ecef681a.png
              max_tokens: 300
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: string
                description: 需通过正则去匹配需要的内容
              examples:
                '1':
                  summary: 成功示例
                  value:
                    id: chatcmpl-9p5UcdrmanOLDtFGUQFuX4EOGQCsO
                    object: chat.completion
                    created: 1721962870
                    model: gpt-4o-mini-2024-07-18
                    choices:
                      - index: 0
                        message:
                          role: assistant
                          content: 这是一张橙子的图标或插图，橙子上有一片绿色的叶子。整体设计简洁，颜色对比明显。
                        logprobs: null
                        finish_reason: stop
                    usage:
                      prompt_tokens: 8511
                      completion_tokens: 34
                      total_tokens: 8545
                    system_fingerprint: fp_611b667b19
                '2':
                  summary: 密钥错误
                  value:
                    codes: 900
                    mess: 密钥错误或已过期，请通过微信访问yewu.bcwhkj.cn个人中心获取
                    data: token
                '3':
                  summary: 非法内容
                  value:
                    codes: 400
                    mess: 非法字符。请勿提交
                    data: ''
                '4':
                  summary: 内容安全
                  value:
                    codes: 402
                    mess: 提交问题涉及内容安全，请修改问题
                    data: ''
                '5':
                  summary: 额度不足
                  value:
                    codes: 300
                    mess: 当前额度不足，请充值后继续使用
                    data: ''
          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-198006673-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://yewu.bcwhkj.cn
    description: 正式环境
security: []

```
