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

# Context.dev: Contextdev Post Parse

> Parse Bytes. Context.dev Contextdev Post Parse reference includes SDK V2 and CLI requests, input constraints, response fields, and Deepline cost.

Parse Bytes.

<Info>
  Tool ID: `contextdev_post_parse`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'contextdev_post_parse',
  {
    "content_base64": "example"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={null}
deepline tools execute contextdev_post_parse --input '{
  "content_base64": "example"
}' --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "data": {
    "success": true,
    "markdown": "example",
    "type": "html"
  }
}
```

Use `deepline tools get contextdev_post_parse --json` for the latest machine-readable contract.

## Input reference

Converts raw text, source code, web/data, PDF, Microsoft Office, and image bytes into LLM-usable Markdown.

| Name                          | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Required | Default        | Details                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `payload.extension`           | `"txt" \| "text" \| "md" \| "markdown" \| "html" \| "htm" \| "xhtml" \| "xml" \| "rss" \| "atom" \| "csv" \| "tsv" \| "yaml" \| "yml" \| "py" \| "java" \| "js" \| "jsx" \| "mjs" \| "cjs" \| "json" \| "jsonl" \| "ndjson" \| "php" \| "sh" \| "bash" \| "zsh" \| "fish" \| "rb" \| "ts" \| "tsx" \| "rtf" \| "srt" \| "css" \| "scss" \| "less" \| "styl" \| "sass" \| "svg" \| "pdf" \| "docx" \| "doc" \| "xlsx" \| "xlsm" \| "xlsb" \| "xltx" \| "xltm" \| "xls" \| "pptx" \| "pptm" \| "ppsx" \| "ppsm" \| "potx" \| "potm" \| "ppt" \| "pps" \| "pot" \| "jpg" \| "jpeg" \| "jpe" \| "png" \| "gif" \| "bmp" \| "tiff" \| "tif" \| "webp" \| "ppm" \| "pbm" \| "pgm" \| "pnm"` | No       | —              | Optional file extension hint, such as pdf, docx, xlsx, pptx, html, json, csv, md, py, rtf, jpg, png, or txt. Allowed: `txt`, `text`, `md`, `markdown`, `html`, `htm`, `xhtml`, `xml`, `rss`, `atom`, `csv`, `tsv`, `yaml`, `yml`, `py`, `java`, `js`, `jsx`, `mjs`, `cjs`, `json`, `jsonl`, `ndjson`, `php`, `sh`, `bash`, `zsh`, `fish`, `rb`, `ts`, `tsx`, `rtf`, `srt`, `css`, `scss`, `less`, `styl`, `sass`, `svg`, `pdf`, `docx`, `doc`, `xlsx`, `xlsm`, `xlsb`, `xltx`, `xltm`, `xls`, `pptx`, `pptm`, See the live schema for the complete constraint. |
| `payload.includeLinks`        | `boolean`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | No       | `true`         | Preserve hyperlinks in Markdown output                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `payload.includeImages`       | `boolean`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | No       | `false`        | Include image references in Markdown output                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `payload.shortenBase64Images` | `boolean`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | No       | `true`         | Shorten base64-encoded image data in the Markdown output                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `payload.useMainContentOnly`  | `boolean`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | No       | `false`        | Extract only the main content from HTML-like inputs                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `payload.ocr`                 | `boolean`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | No       | `false`        | When true for PDF inputs, OCR the selected pages that have no usable text layer (scans), replacing each recovered page's text with the OCR result while pages with a real text layer keep it. pdf.start/pdf.end limit the inclusive page range. When false, no OCR runs.                                                                                                                                                                                                                                                                                       |
| `payload.pdf`                 | `object`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | No       | `&#123;&#125;` | PDF page-range options as a JSON object, e.g. \{"start": 2, "end": 5}.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `payload.client`              | `string`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | No       | —              | Optional client identifier used for usage attribution. Minimum length: 1. Maximum length: 100.                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `payload.zdr`                 | `"enabled" \| "disabled"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | No       | `"disabled"`   | Set to enabled to bypass shared caches and omit request and response content from retained usage logs. Requires zero data retention to be enabled for your organization (contact [support@context.dev](mailto:support@context.dev)), otherwise the request fails with ZDR\_NOT\_ENABLED. Successful ZDR responses include X-Context-ZDR: true. Allowed: `enabled`, `disabled`.                                                                                                                                                                                 |
| `payload.tags`                | `array`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | No       | —              | Optional comma-separated caller-defined tags for tracking this request. Tags are recorded on the request's usage log and can be used to filter usage on the dashboard usage page. Up to 20 tags, each 1-50 characters. Maximum items: 20.                                                                                                                                                                                                                                                                                                                      |
| `payload.content_base64`      | `string`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Yes      | —              | Base64-encoded file bytes to parse. Minimum length: 1.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `payload.content_type`        | `string`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | No       | —              | Optional MIME type sent upstream. Defaults to application/octet-stream. Minimum length: 1.                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Converts raw text, source code, web/data, PDF, Microsoft Office, and image bytes into LLM-usable Markdown.",
    "properties": {
      "extension": {
        "type": "string",
        "description": "Optional file extension hint, such as pdf, docx, xlsx, pptx, html, json, csv, md, py, rtf, jpg, png, or txt.",
        "enum": [
          "txt",
          "text",
          "md",
          "markdown",
          "html",
          "htm",
          "xhtml",
          "xml",
          "rss",
          "atom",
          "csv",
          "tsv",
          "yaml",
          "yml",
          "py",
          "java",
          "js",
          "jsx",
          "mjs",
          "cjs",
          "json",
          "jsonl",
          "ndjson",
          "php",
          "sh",
          "bash",
          "zsh",
          "fish",
          "rb",
          "ts",
          "tsx",
          "rtf",
          "srt",
          "css",
          "scss",
          "less",
          "styl",
          "sass",
          "svg",
          "pdf",
          "docx",
          "doc",
          "xlsx",
          "xlsm",
          "xlsb",
          "xltx",
          "xltm",
          "xls",
          "pptx",
          "pptm",
          "ppsx",
          "ppsm",
          "potx",
          "potm",
          "ppt",
          "pps",
          "pot",
          "jpg",
          "jpeg",
          "jpe",
          "png",
          "gif",
          "bmp",
          "tiff",
          "tif",
          "webp",
          "ppm",
          "pbm",
          "pgm",
          "pnm"
        ]
      },
      "includeLinks": {
        "type": "boolean",
        "description": "Preserve hyperlinks in Markdown output",
        "default": true
      },
      "includeImages": {
        "type": "boolean",
        "description": "Include image references in Markdown output",
        "default": false
      },
      "shortenBase64Images": {
        "type": "boolean",
        "description": "Shorten base64-encoded image data in the Markdown output",
        "default": true
      },
      "useMainContentOnly": {
        "type": "boolean",
        "description": "Extract only the main content from HTML-like inputs",
        "default": false
      },
      "ocr": {
        "type": "boolean",
        "description": "When true for PDF inputs, OCR the selected pages that have no usable text layer (scans), replacing each recovered page's text with the OCR result while pages with a real text layer keep it. pdf.start/pdf.end limit the inclusive page range. When false, no OCR runs.",
        "default": false
      },
      "pdf": {
        "type": "object",
        "description": "PDF page-range options as a JSON object, e.g. {\"start\": 2, \"end\": 5}.",
        "default": {},
        "properties": {
          "start": {
            "type": "integer",
            "description": "First 1-based PDF page to parse. When omitted, parsing starts at the first page.",
            "minimum": 1
          },
          "end": {
            "type": "integer",
            "description": "Last 1-based PDF page to parse. When omitted, parsing ends at the last page. Must be greater than or equal to start when both are provided.",
            "minimum": 1
          }
        },
        "additionalProperties": false
      },
      "client": {
        "type": "string",
        "description": "Optional client identifier used for usage attribution.",
        "minLength": 1,
        "maxLength": 100
      },
      "zdr": {
        "type": "string",
        "description": "Set to enabled to bypass shared caches and omit request and response content from retained usage logs. Requires zero data retention to be enabled for your organization (contact support@context.dev), otherwise the request fails with ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true.",
        "default": "disabled",
        "enum": [
          "enabled",
          "disabled"
        ]
      },
      "tags": {
        "type": "array",
        "description": "Optional comma-separated caller-defined tags for tracking this request. Tags are recorded on the request's usage log and can be used to filter usage on the dashboard usage page. Up to 20 tags, each 1-50 characters.",
        "maxItems": 20,
        "items": {
          "type": "string",
          "minLength": 1,
          "maxLength": 50
        }
      },
      "content_base64": {
        "type": "string",
        "description": "Base64-encoded file bytes to parse.",
        "minLength": 1
      },
      "content_type": {
        "type": "string",
        "description": "Optional MIME type sent upstream. Defaults to application/octet-stream.",
        "minLength": 1
      }
    },
    "required": [
      "content_base64"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name                       | Type                                                                                                                                                                                                                                                                                                                                                                                                                       | Required | Default | Details                                                                                                                                                                                                                                                                                                                                            |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `result.data`              | `object`                                                                                                                                                                                                                                                                                                                                                                                                                   | Yes      | —       | —                                                                                                                                                                                                                                                                                                                                                  |
| `result.data.success`      | `true`                                                                                                                                                                                                                                                                                                                                                                                                                     | Yes      | —       | Allowed: `true`.                                                                                                                                                                                                                                                                                                                                   |
| `result.data.markdown`     | `string`                                                                                                                                                                                                                                                                                                                                                                                                                   | Yes      | —       | —                                                                                                                                                                                                                                                                                                                                                  |
| `result.data.type`         | `"html" \| "xml" \| "json" \| "jsonl" \| "text" \| "csv" \| "tsv" \| "markdown" \| "yaml" \| "python" \| "java" \| "javascript" \| "php" \| "shell" \| "ruby" \| "typescript" \| "rtf" \| "srt" \| "css" \| "scss" \| "less" \| "stylus" \| "sass" \| "svg" \| "pdf" \| "docx" \| "doc" \| "xlsx" \| "xls" \| "pptx" \| "ppt" \| "jpg" \| "png" \| "gif" \| "bmp" \| "tiff" \| "webp" \| "ppm" \| "pbm" \| "pgm" \| "pnm"` | Yes      | —       | Allowed: `html`, `xml`, `json`, `jsonl`, `text`, `csv`, `tsv`, `markdown`, `yaml`, `python`, `java`, `javascript`, `php`, `shell`, `ruby`, `typescript`, `rtf`, `srt`, `css`, `scss`, `less`, `stylus`, `sass`, `svg`, `pdf`, `docx`, `doc`, `xlsx`, `xls`, `pptx`, `ppt`, `jpg`, `png`, `gif`, `bmp`, `tiff`, `webp`, `ppm`, `pbm`, `pgm`, `pnm`. |
| `result.data.key_metadata` | `object`                                                                                                                                                                                                                                                                                                                                                                                                                   | No       | —       | —                                                                                                                                                                                                                                                                                                                                                  |
| `result.meta`              | `object`                                                                                                                                                                                                                                                                                                                                                                                                                   | No       | —       | —                                                                                                                                                                                                                                                                                                                                                  |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "data": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "markdown": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "html",
              "xml",
              "json",
              "jsonl",
              "text",
              "csv",
              "tsv",
              "markdown",
              "yaml",
              "python",
              "java",
              "javascript",
              "php",
              "shell",
              "ruby",
              "typescript",
              "rtf",
              "srt",
              "css",
              "scss",
              "less",
              "stylus",
              "sass",
              "svg",
              "pdf",
              "docx",
              "doc",
              "xlsx",
              "xls",
              "pptx",
              "ppt",
              "jpg",
              "png",
              "gif",
              "bmp",
              "tiff",
              "webp",
              "ppm",
              "pbm",
              "pgm",
              "pnm"
            ]
          },
          "key_metadata": {
            "type": "object",
            "properties": {},
            "required": [],
            "additionalProperties": false
          }
        },
        "required": [
          "success",
          "markdown",
          "type"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Context.dev provider guide](/docs/providers/contextdev/guide)
* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)
