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

> [!NOTE]
>
> Tool ID: `grain_create_recording_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(
  'grain_create_recording_upload',
  {
    "filename": "example"
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute grain_create_recording_upload --input '{
  "filename": "example"
}' --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": {
    "uuid": "uuid_123",
    "url": "https://example.com",
    "max_duration_sec": 123
  }
}
```

Use `deepline describe 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={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "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={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "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](https://deepline.com/docs/providers/grain/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.