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

# Grain: Create Recording Upload

> Create an upload URL for filename. Workspace tokens also require user_id. Upload the file separately with PUT; upload_status hooks report processing results.

Create an upload URL for filename.

<Info>
  Tool ID: `grain_create_recording_upload`
</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(
  'grain_create_recording_upload',
  {
    "filename": "example"
  },
);

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

### CLI

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

## Example response

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

```json theme={null}
{
  "data": {
    "uuid": "uuid_123",
    "url": "https://example.com",
    "max_duration_sec": 123
  }
}
```

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

## Input reference

Create an upload URL for filename. Workspace tokens also require user\_id. Upload the file separately with PUT; upload\_status hooks report processing results.

| Name               | Type     | Required | Default | Details                                                |
| ------------------ | -------- | -------- | ------- | ------------------------------------------------------ |
| `payload.filename` | `string` | Yes      | —       | Name of the upload file                                |
| `payload.user_id`  | `string` | No       | —       | User to own the recording. Obtained through List Users |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Create an upload URL for filename. Workspace tokens also require user_id. Upload the file separately with PUT; upload_status hooks report processing results.",
    "properties": {
      "filename": {
        "type": "string",
        "description": "Name of the upload file"
      },
      "user_id": {
        "type": "string",
        "description": "User to own the recording. Obtained through List Users"
      }
    },
    "required": [
      "filename"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name                           | Type      | Required | Default | Details                                                                               |
| ------------------------------ | --------- | -------- | ------- | ------------------------------------------------------------------------------------- |
| `result.data`                  | `object`  | Yes      | —       | Provider response payload.                                                            |
| `result.data.uuid`             | `string`  | No       | —       | id of the upload, will be present in the upload hooks if a upload\_status hook exists |
| `result.data.url`              | `string`  | No       | —       | url to upload the file to                                                             |
| `result.data.max_duration_sec` | `integer` | No       | —       | Max duration in seconds the upload can be                                             |
| `result.data.max_upload_bytes` | `integer` | No       | —       | Max size in bytes the upload can be                                                   |
| `result.meta`                  | `object`  | No       | —       | Additional response metadata (status, paging).                                        |

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

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "uuid": {
            "type": "string",
            "description": "id of the upload, will be present in the upload hooks if a upload_status hook exists"
          },
          "url": {
            "type": "string",
            "description": "url to upload the file to"
          },
          "max_duration_sec": {
            "type": "integer",
            "description": "Max duration in seconds the upload can be"
          },
          "max_upload_bytes": {
            "type": "integer",
            "description": "Max size in bytes the upload can be"
          }
        },
        "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

* [Grain provider guide](/docs/providers/grain/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)
