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

# Methods

> Per-model method and method_params reference

Most VLM Run Gateway models expose one or more `method` values that select a
specific operation. Pass `method` (and optional `method_params`) at the top
level of the request body, or via `extra_body` in the OpenAI Python SDK. If
you omit `method`, the model's default is applied.

<Tabs>
  <Tab title="Request body">
    ```json theme={"theme":{"light":"github-light","dark":"dark-plus"}}
    {
      "model": "paddleocr/pp-ocrv6",
      "method": "ocr",
      "messages": [ ... ]
    }
    ```
  </Tab>

  <Tab title="OpenAI SDK">
    ```python theme={"theme":{"light":"github-light","dark":"dark-plus"}}
    from openai import OpenAI

    client = OpenAI(...)
    response = client.chat.completions.create(
        model="paddleocr/pp-ocrv6",
        messages=[{...}],
        extra_body={"method": "ocr"},
    )
    ```
  </Tab>
</Tabs>

Every model's live `methods`, `default_method`, and `extra_body_help` are
also available on [`GET /v1/openai/models`](/gateway/api-reference/get-models).

<h2 id="visual-qa">
  Visual Question Answering (VQA)
</h2>

| Model               | Methods                                                                                                                |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `qwen/qwen3.5-0.8b` | N/A: Free-form multimodal chat. Does not use `method` or `method_params`; send natural-language prompts in `messages`. |

<h2 id="document-and-image-ocr">
  Document and Image OCR
</h2>

| Model                     | Methods                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `paddleocr/pp-ocrv6`      | <ul><li><kbd>ocr</kbd>: full detection + recognition. `method_params.lang` selects the recognition language (`en`, `ch`, `japan`, …); optional `method_params.score_threshold` filters low-confidence lines. (default)</li><li><kbd>detect</kbd>: text detection only. Returns bounding polygons in JSON without recognised text.</li><li><kbd>markdown</kbd>: reading-order markdown page output used for the streaming page-block flow.</li></ul> |
| `zai-org/glm-ocr`         | <ul><li><kbd>markdown</kbd>: reading-order markdown page output used for the streaming page-block flow. (default)</li></ul>                                                                                                                                                                                                                                                                                                                         |
| `rednote-hilab/dots.mocr` | <ul><li><kbd>markdown</kbd>: reading-order markdown page output used for the streaming page-block flow. (default)</li></ul>                                                                                                                                                                                                                                                                                                                         |

<h2 id="method-parameters">
  Method Parameters
</h2>

`method_params` is an optional object passed alongside `method` at the top
level of the request body, or via `extra_body` in the OpenAI Python SDK. Keys
are model- and method-specific; the tables above call out the parameters each
method accepts.

<Tabs>
  <Tab title="Request body">
    ```json theme={"theme":{"light":"github-light","dark":"dark-plus"}}
    {
      "model": "paddleocr/pp-ocrv6",
      "method": "ocr",
      "method_params": {
        "lang": "en",
        "score_threshold": 0.5
      },
      "messages": [ ... ]
    }
    ```
  </Tab>

  <Tab title="OpenAI SDK">
    ```python theme={"theme":{"light":"github-light","dark":"dark-plus"}}
    response = client.chat.completions.create(
        model="paddleocr/pp-ocrv6",
        messages=[{...}],
        extra_body={
            "method": "ocr",
            "method_params": {"lang": "en", "score_threshold": 0.5},
        },
    )
    ```
  </Tab>
</Tabs>

### Method-specific keys

| Key               | Model                | Method(s)       | Description                                                                   |
| ----------------- | -------------------- | --------------- | ----------------------------------------------------------------------------- |
| `lang`            | `paddleocr/pp-ocrv6` | `ocr`, `detect` | Recognition language (`en`, `ch`, `japan`, …). Default `en`.                  |
| `score_threshold` | `paddleocr/pp-ocrv6` | `ocr`           | Drop text regions below this recognition confidence (0.0–1.0). Default `0.5`. |

## Related

<CardGroup cols={2}>
  <Card title="Multimodal Inputs" icon="images" href="/gateway/multimodal-inputs">
    Content part types and document input limits.
  </Card>

  <Card title="Models" icon="table-list" href="/gateway/models">
    Availability status and capability matrix for every model.
  </Card>

  <Card title="Chat Completions" icon="comments" href="/gateway/api-reference/post-chat-completions">
    Full request and response schema.
  </Card>
</CardGroup>
