> ## 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.

# glm-5.3

> Creates a GLM-5.3 response for the supplied conversation. GLM-5.3 always uses thinking; thinking.type can only be enabled, and reasoning_effort can only be low, high, or max.



## OpenAPI

````yaml api-reference/model-api/zhipu/openapi/glm-5.3/openapi.yaml POST /v1/chat/completions
openapi: 3.1.0
info:
  title: GLM-5.3
  description: >-
    Zhipu AI's GLM-5.3 flagship reasoning model through the AnyFast
    OpenAI-compatible API.
  version: 1.0.0
servers:
  - url: https://www.anyfast.ai
security:
  - bearerAuth: []
paths:
  /v1/chat/completions:
    post:
      summary: Create a GLM-5.3 chat completion
      description: >-
        Creates a GLM-5.3 response for the supplied conversation. GLM-5.3 always
        uses thinking; thinking.type can only be enabled, and reasoning_effort
        can only be low, high, or max.
      operationId: createChatCompletionGlm53
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - messages
              properties:
                model:
                  type: string
                  enum:
                    - glm-5.3
                  description: Model ID. Must be glm-5.3.
                  example: glm-5.3
                messages:
                  type: array
                  minItems: 1
                  description: The complete conversation in chronological order.
                  items:
                    type: object
                    required:
                      - role
                      - content
                    properties:
                      role:
                        type: string
                        enum:
                          - system
                          - user
                          - assistant
                          - tool
                        description: The message author.
                      content:
                        type: string
                        description: Text content of the message.
                      name:
                        type: string
                        description: Optional participant or tool name.
                      tool_call_id:
                        type: string
                        description: Tool call ID when role is tool.
                  example:
                    - role: system
                      content: You are a senior software engineer.
                    - role: user
                      content: Design a reliable distributed job queue.
                thinking:
                  type: object
                  description: >-
                    Thinking configuration. Thinking remains enabled when this
                    field is omitted. GLM-5.3 does not accept disabled.
                  properties:
                    type:
                      type: string
                      enum:
                        - enabled
                      default: enabled
                      description: Only enabled is supported.
                reasoning_effort:
                  type: string
                  enum:
                    - low
                    - high
                    - max
                  default: max
                  description: >-
                    Thinking intensity. Use low for lightweight reasoning, high
                    for enhanced reasoning, or max for deep reasoning.
                stream:
                  type: boolean
                  default: false
                  description: Streams partial response deltas over SSE when true.
                do_sample:
                  type: boolean
                  default: true
                  description: >-
                    Enables sampling. When false, temperature and top_p are
                    ignored.
                temperature:
                  type: number
                  format: float
                  minimum: 0
                  maximum: 1
                  default: 1
                  description: >-
                    Sampling temperature. Adjust either temperature or top_p,
                    not both.
                  example: 1
                top_p:
                  type: number
                  format: float
                  minimum: 0
                  maximum: 1
                  default: 0.95
                  description: >-
                    Nucleus sampling threshold. AnyFast accepts values from 0 to
                    1.
                  example: 0.95
                max_tokens:
                  type: integer
                  minimum: 1
                  maximum: 131072
                  default: 65536
                  description: Maximum generated tokens. Zhipu AI recommends at least 1024.
                tool_stream:
                  type: boolean
                  default: false
                  description: Streams Function Call output when streaming is enabled.
                tools:
                  type: array
                  description: Function or MCP tool definitions available to the model.
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        example: function
                      function:
                        type: object
                        properties:
                          name:
                            type: string
                          description:
                            type: string
                          parameters:
                            type: object
                            additionalProperties: true
                tool_choice:
                  type: string
                  enum:
                    - auto
                  description: Controls tool selection.
                stop:
                  type: array
                  maxItems: 4
                  description: Up to four sequences that stop generation.
                  items:
                    type: string
                response_format:
                  type: object
                  description: Selects text or JSON object output.
                  properties:
                    type:
                      type: string
                      enum:
                        - text
                        - json_object
                      default: text
                request_id:
                  type: string
                  minLength: 6
                  maxLength: 64
                  description: Client-provided unique request ID.
                user_id:
                  type: string
                  minLength: 6
                  maxLength: 128
                  description: Non-sensitive identifier for the end user.
            example:
              model: glm-5.3
              messages:
                - role: user
                  content: Reply with exactly OK.
              max_tokens: 128
      responses:
        '200':
          description: Completion generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletion'
              example:
                id: 20260819113252725deddc07234b73
                object: chat.completion
                created: 1787110376
                model: glm-5.3
                choices:
                  - index: 0
                    message:
                      role: assistant
                      reasoning_content: >-
                        The user requested an exact short response, so the final
                        answer should be OK.
                      content: OK
                    finish_reason: stop
                usage:
                  prompt_tokens: 17
                  completion_tokens: 91
                  completion_tokens_details:
                    reasoning_tokens: 88
                  prompt_tokens_details:
                    cached_tokens: 0
                  total_tokens: 108
        '400':
          description: >-
            Invalid request, including disabled thinking or an out-of-range
            numeric parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  message: 该模型始终思考，不支持关闭思考；请使用 low、high 或 max。
                  type: upstream_error
                  param: ''
                  code: '1210'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ChatCompletion:
      type: object
      required:
        - id
        - object
        - created
        - model
        - choices
      properties:
        id:
          type: string
          description: Completion ID.
        request_id:
          type: string
          description: Request ID.
        object:
          type: string
          example: chat.completion
        created:
          type: integer
          description: Unix timestamp in seconds.
        model:
          type: string
          example: glm-5.3
        choices:
          type: array
          items:
            type: object
            properties:
              index:
                type: integer
              message:
                type: object
                properties:
                  role:
                    type: string
                    example: assistant
                  content:
                    type: string
                    description: Final answer text.
                  reasoning_content:
                    type: string
                    description: Reasoning output produced before the final answer.
                  tool_calls:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        type:
                          type: string
                        function:
                          type: object
                          properties:
                            name:
                              type: string
                            arguments:
                              type: string
              finish_reason:
                type: string
                enum:
                  - stop
                  - length
                  - tool_calls
                  - content_filter
        usage:
          type: object
          properties:
            prompt_tokens:
              type: integer
            completion_tokens:
              type: integer
            completion_tokens_details:
              type: object
              properties:
                reasoning_tokens:
                  type: integer
                  description: Number of tokens used for reasoning.
            prompt_tokens_details:
              type: object
              properties:
                cached_tokens:
                  type: integer
                  description: Number of prompt tokens served from cache.
            total_tokens:
              type: integer
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            type:
              type: string
            param:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key

````