> ## Documentation Index
> Fetch the complete documentation index at: https://openrouter-d02e98a0-mintlify-7021d5f4.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ApplyPatchCallItem - Python SDK

> ApplyPatchCallItem method reference

<Warning>
  The Python SDK and docs are currently in beta.
  Report issues on [GitHub](https://github.com/OpenRouterTeam/python-sdk/issues).
</Warning>

A tool call emitted by the model requesting a V4A patch operation. The client applies the patch and echoes an `apply_patch_call_output` on the next turn.

## Fields

| Field       | Type                                                                                                       | Required             | Description                                                                                                                       | Example                                                                                                                         |
| ----------- | ---------------------------------------------------------------------------------------------------------- | -------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `call_id`   | *str*                                                                                                      | :heavy\_check\_mark: | N/A                                                                                                                               |                                                                                                                                 |
| `id`        | *OptionalNullable\[str]*                                                                                   | :heavy\_minus\_sign: | N/A                                                                                                                               |                                                                                                                                 |
| `operation` | [components.ApplyPatchCallOperation](/client-sdks/python/api-reference/components/applypatchcalloperation) | :heavy\_check\_mark: | The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it. | `{"diff": "@@ function main() {\n+  console.log(\"hi\");\n }`",<br />"path": "/src/main.ts",<br />"type": "update\_file"<br />} |
| `status`    | [components.ApplyPatchCallStatus](/client-sdks/python/api-reference/components/applypatchcallstatus)       | :heavy\_check\_mark: | Lifecycle state of an `apply_patch_call` output item.                                                                             | completed                                                                                                                       |
| `type`      | [components.ApplyPatchCallItemType](/client-sdks/python/api-reference/components/applypatchcallitemtype)   | :heavy\_check\_mark: | N/A                                                                                                                               |                                                                                                                                 |
