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

# Using SoMark in Coze

> Add SoMark document parsing to your Coze agents and workflows via the plugin marketplace

## About Coze

Coze (扣子) is a no-code AI application development platform by ByteDance. It lets anyone — regardless of coding experience — rapidly build chatbots, AI agents, and plugins, then deploy them across social and messaging platforms.

The SoMark plugin is available in the Coze plugin store and brings powerful document parsing capabilities to your agents and workflows.

## Adding SoMark to an Agent

<Steps>
  <Step title="Create an agent">
    Go to your workspace, click **Project Development** → **+ Project** (top right) → **Create Agent**. <img src="https://mintcdn.com/soulcode-aa7e5a93/I8QD66YzkFVIEkWW/images/coze-%E5%88%9B%E5%BB%BA%E6%99%BA%E8%83%BD%E4%BD%93.png?fit=max&auto=format&n=I8QD66YzkFVIEkWW&q=85&s=41a9d96df1ff88cd26bc7aafbe77c5e0" alt="Create agent in Coze" width="1851" height="929" data-path="images/coze-创建智能体.png" />
  </Step>

  <Step title="Add the SoMark plugin">
    In the agent editor, locate the **Skills** section and click to add a plugin. <img src="https://mintcdn.com/soulcode-aa7e5a93/I8QD66YzkFVIEkWW/images/coze-%E6%B7%BB%E5%8A%A0%E6%8F%92%E4%BB%B6-1.png?fit=max&auto=format&n=I8QD66YzkFVIEkWW&q=85&s=1f78201b3763d477ed5bc925b28bd49b" alt="Add plugin in Coze - step 1" width="1851" height="929" data-path="images/coze-添加插件-1.png" /> Search for **somark**, then find
    and add the **somark\_doc\_parse** plugin. <img src="https://mintcdn.com/soulcode-aa7e5a93/Ha2UCJE-ORRyntwZ/images/coze-%E6%B7%BB%E5%8A%A0%E6%8F%92%E4%BB%B6-2.png?fit=max&auto=format&n=Ha2UCJE-ORRyntwZ&q=85&s=194ca670846badfe2dc926758a0033a1" alt="Add plugin in Coze - step 2" width="2994" height="1460" data-path="images/coze-添加插件-2.png" />
  </Step>

  <Step title="Configure the API key">
    In the plugin parameter editor, enter your SoMark API key.

    <Note>
      No API key yet? [Go to the SoMark API workbench to get your API key](https://somark.tech/workbench/apikey). Free quota does not need to be claimed and is automatically
      credited to your account (500 pages/day, 2000 pages/month).
    </Note>

    <img src="https://mintcdn.com/soulcode-aa7e5a93/Ha2UCJE-ORRyntwZ/images/coze-%E9%85%8D%E7%BD%AEapikey-1.png?fit=max&auto=format&n=Ha2UCJE-ORRyntwZ&q=85&s=06dcd95b3f6c1ae0c07af4c7b3f24ccb" alt="Configure API key in Coze" width="3024" height="1468" data-path="images/coze-配置apikey-1.png" /> After entering the API key, toggle the switch on the right to **enable it by default**. This ensures every
    request automatically uses the configured API key without requiring users to enter it manually.
  </Step>

  <Step title="Configure other parameters">
    In addition to the API key, you can configure other optional parameters based on your needs, such as **Output formats**, **Image format**, **Formula format**, **Element
    structure format**, and **Table format**. You can also use `feature_config` to control options such as **enable text cross page**, **enable table cross page**, **enable
    title level recognition**, **enable inline image**, **enable table image**,**enable image understanding**, and **keep header footer**. If you are unsure how to configure
    these options, start with the defaults and tune them one by one based on your workflow results. See **Plugin Parameters** below for detailed configuration descriptions.

    <img src="https://mintcdn.com/soulcode-aa7e5a93/Ha2UCJE-ORRyntwZ/images/coze-%E5%8F%82%E6%95%B0.png?fit=max&auto=format&n=Ha2UCJE-ORRyntwZ&q=85&s=94bacbed2e83c770986beca4a37ce86b" alt="Configure plugin parameters in Coze" width="3000" height="1446" data-path="images/coze-参数.png" />
  </Step>

  <Step title="Save and test">
    Click **Save**. Your agent can now use SoMark document parsing. Upload a file in the chat to see the "Calling somark" indicator. The parsed result will be returned once
    processing is complete. <img src="https://mintcdn.com/soulcode-aa7e5a93/I8QD66YzkFVIEkWW/images/coze-%E6%B5%8B%E8%AF%95%E8%B0%83%E7%94%A8.png?fit=max&auto=format&n=I8QD66YzkFVIEkWW&q=85&s=be59e388962bd9186a2fdeb92c00417d" alt="Test SoMark in Coze" width="1851" height="929" data-path="images/coze-测试调用.png" />
  </Step>
</Steps>

## Plugin Parameters

| Parameter         | Type   | Required | Description                                                                                                                           |
| ----------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `file`            | file   | ✅        | File to parse. Supports PDF, images, Word, PPT, and Excel formats                                                                     |
| `api_key`         | string | ✅        | API key in the format `sk-***`                                                                                                        |
| `output_formats`  | array  | ❌        | Output formats. You can pass multiple values. If omitted, the default is `["markdown", "json"]`. Supported values: `json`, `markdown` |
| `element_formats` | object | ❌        | Element format settings that control the return format for images, formulas, tables, and chemical structures                          |
| `feature_config`  | object | ❌        | Feature settings. This parameter was renamed from `extract_config` to `feature_config`                                                |

<AccordionGroup>
  <Accordion title="element_formats">
    | Field     | Type   | Description                                                            |
    | --------- | ------ | ---------------------------------------------------------------------- |
    | `image`   | string | Image return format. Supported values: `url`, `base64`, `file`, `none` |
    | `formula` | string | Formula return format. Supported values: `latex`, `mathml`, `ascii`    |
    | `table`   | string | Table return format. Supported values: `markdown`, `html`, `image`     |
    | `cs`      | string | Chemical structure return format. Currently supports `image`           |
  </Accordion>

  <Accordion title="feature_config" defaultOpen>
    | Field                            | Type    | Description                                                                      |
    | -------------------------------- | ------- | -------------------------------------------------------------------------------- |
    | `enable_text_cross_page`         | boolean | Whether to enable cross-page text stitching. Supported values: `true` / `false`  |
    | `enable_table_cross_page`        | boolean | Whether to enable cross-page table stitching. Supported values: `true` / `false` |
    | `enable_title_level_recognition` | boolean | Whether to enable heading level recognition. Supported values: `true` / `false`  |
    | `enable_inline_image`            | boolean | Whether to return inline images. Supported values: `true` / `false`              |
    | `enable_table_image`             | boolean | Whether to return images inside tables. Supported values: `true` / `false`       |
    | `enable_image_understanding`     | boolean | Whether to enable image understanding. Supported values: `true` / `false`        |
    | `keep_header_footer`             | boolean | Whether to keep headers and footers. Supported values: `true` / `false`          |
  </Accordion>
</AccordionGroup>
