# 带图像的生成请求（with Images）

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/generate:
    post:
      summary: 带图像的生成请求（with Images）
      deprecated: false
      description: >-
        To submit images to multimodal models such as `llava` or `bakllava`,
        provide a list of base64-encoded `images`:
      tags:
        - 生成补全
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
                  examples:
                    - llava
                prompt:
                  type: string
                  examples:
                    - What is in this picture?
                stream:
                  type: boolean
                  default: false
                images:
                  type: string
                  description: 图片的base64编码字符串
              x-apifox-orders:
                - model
                - prompt
                - stream
                - images
              required:
                - model
                - prompt
                - stream
                - images
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  model:
                    type: string
                  created_at:
                    type: string
                  response:
                    type: string
                  done:
                    type: boolean
                  context:
                    type: array
                    items:
                      type: integer
                  total_duration:
                    type: integer
                  load_duration:
                    type: integer
                  prompt_eval_count:
                    type: integer
                  prompt_eval_duration:
                    type: integer
                  eval_count:
                    type: integer
                  eval_duration:
                    type: integer
                required:
                  - model
                  - created_at
                  - response
                  - done
                  - context
                  - total_duration
                  - load_duration
                  - prompt_eval_count
                  - prompt_eval_duration
                  - eval_count
                  - eval_duration
                x-apifox-orders:
                  - model
                  - created_at
                  - response
                  - done
                  - context
                  - total_duration
                  - load_duration
                  - prompt_eval_count
                  - prompt_eval_duration
                  - eval_count
                  - eval_duration
              example:
                model: llava
                created_at: '2023-11-03T15:36:02.583064Z'
                response: A happy cartoon character, which is cute and cheerful.
                done: true
                context:
                  - 1
                  - 2
                  - 3
                total_duration: 2938432250
                load_duration: 2559292
                prompt_eval_count: 1
                prompt_eval_duration: 2195557000
                eval_count: 44
                eval_duration: 736432000
          headers: {}
          x-apifox-name: Success
      security: []
      x-apifox-folder: 生成补全
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/6041320/apis/api-272428817-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: http://localhost:11434/api/
    description: 正式环境
security: []

```
