> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anyfast.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# grok-4.3

> Grok 4.3 聊天补全，支持可配置推理和图片输入。



## OpenAPI

````yaml zh/api-reference/model-api/xai/openapi/grok-4-3/openapi.yaml POST /v1/chat/completions
openapi: 3.1.0
info:
  title: Grok 4.3
  description: 通过 AnyFast OpenAI 兼容接口调用 Grok 4.3。
  version: 1.0.0
servers:
  - url: https://www.anyfast.ai
security:
  - bearerAuth: []
paths:
  /v1/chat/completions:
    post:
      summary: 创建聊天补全
      description: 创建聊天补全。reasoning_effort 支持 none、low、medium 和 high。
      operationId: creategrok43ChatCompletion
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - messages
              properties:
                model:
                  type: string
                  enum:
                    - grok-4.3
                  description: 模型 ID。
                  example: grok-4.3
                messages:
                  type: array
                  minItems: 1
                  description: 对话消息列表。用户消息支持纯文本或文本与图片 URL 组合。
                  items:
                    type: object
                    required:
                      - role
                      - content
                    properties:
                      role:
                        type: string
                        enum:
                          - system
                          - user
                          - assistant
                          - tool
                      content:
                        oneOf:
                          - type: string
                          - type: array
                            items:
                              oneOf:
                                - type: object
                                  required:
                                    - type
                                    - text
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - text
                                    text:
                                      type: string
                                - type: object
                                  required:
                                    - type
                                    - image_url
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - image_url
                                    image_url:
                                      type: object
                                      required:
                                        - url
                                      properties:
                                        url:
                                          type: string
                                          format: uri
                                        detail:
                                          type: string
                                          enum:
                                            - auto
                                            - low
                                            - high
                reasoning_effort:
                  type: string
                  enum:
                    - none
                    - low
                    - medium
                    - high
                  description: 推理强度。
                max_tokens:
                  type: integer
                  minimum: 1
                  description: 最大生成 Token 数。
                stream:
                  type: boolean
                  default: false
                  description: 是否通过 SSE 返回增量。
            example:
              model: grok-4.3
              messages:
                - role: user
                  content: Explain why binary search is O(log n).
              reasoning_effort: low
              stream: false
      responses:
        '200':
          description: 成功生成聊天补全
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  object:
                    type: string
                    example: chat.completion
                  created:
                    type: integer
                  model:
                    type: string
                    example: grok-4.3
                  choices:
                    type: array
                    items:
                      type: object
                      properties:
                        index:
                          type: integer
                        message:
                          type: object
                          properties:
                            role:
                              type: string
                              example: assistant
                            content:
                              type: string
                        finish_reason:
                          type: string
                  usage:
                    type: object
                    properties:
                      prompt_tokens:
                        type: integer
                      completion_tokens:
                        type: integer
                      total_tokens:
                        type: integer
                      prompt_tokens_details:
                        type: object
                        properties:
                          text_tokens:
                            type: integer
                          image_tokens:
                            type: integer
                          cached_tokens:
                            type: integer
                      completion_tokens_details:
                        type: object
                        properties:
                          reasoning_tokens:
                            type: integer
                      num_sources_used:
                        type: integer
              example:
                id: chatcmpl_example
                object: chat.completion
                created: 1787865600
                model: grok-4.3
                choices:
                  - index: 0
                    message:
                      role: assistant
                      content: >-
                        Binary search halves the remaining search space at each
                        step.
                    finish_reason: stop
                usage:
                  prompt_tokens: 18
                  completion_tokens: 15
                  total_tokens: 45
                  prompt_tokens_details:
                    text_tokens: 18
                    image_tokens: 0
                    cached_tokens: 0
                  completion_tokens_details:
                    reasoning_tokens: 12
                  num_sources_used: 0
        '400':
          description: 请求参数无效
        '401':
          description: 未授权
        '429':
          description: 请求频率超限
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````