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

# Attention: Request Kbsource Upload

> Get an upload link to add a PDF, Markdown, HTML or text file to the Attention knowledge base. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

Get an upload link to add a PDF, Markdown, HTML or text file to the Attention knowledge base.

> [!NOTE]
>
> Tool ID: `attention_request_kbsource_upload`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'attention_request_kbsource_upload',
  {
    "title": "VP of Engineering"
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute attention_request_kbsource_upload --input '{
  "title": "VP of Engineering"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "source_id": "source_123",
    "upload_url": "https://example.com"
  }
}
```

Use `deepline describe attention_request_kbsource_upload --json` for the latest machine-readable contract.

## Input reference

Creates a KB source record and returns a presigned S3 PUT URL for file upload. After uploading the file, call confirm-upload to validate and trigger indexing. Supported file types: PDF, Markdown, HTML, plain text. Maximum file size: 100 MB.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.title` | `string` | No | — | Title of the KB source. Optional — if omitted, the server attempts to extract the title from PDF metadata, falling back to 'Untitled upload'. Maximum length: 500. |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Creates a KB source record and returns a presigned S3 PUT URL for file upload. After uploading the file, call confirm-upload to validate and trigger indexing. Supported file types: PDF, Markdown, HTML, plain text. Maximum file size: 100 MB.",
    "properties": {
      "title": {
        "type": "string",
        "description": "Title of the KB source. Optional — if omitted, the server attempts to extract the title from PDF metadata, falling back to 'Untitled upload'.",
        "maxLength": 500
      }
    },
    "required": [],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.source_id` | `string` | No | — | UUID of the created KB source |
| `result.data.upload_url` | `string` | No | — | Presigned S3 PUT URL for uploading the file |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

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

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "source_id": {
            "type": "string",
            "description": "UUID of the created KB source"
          },
          "upload_url": {
            "type": "string",
            "description": "Presigned S3 PUT URL for uploading the file"
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "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

* [Attention provider guide](https://deepline.com/docs/providers/attention/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.