---
title: "Get PDF upload URL"
method: POST
path: "/sources/upload-url"
tags: ["Sources"]
---

# Get PDF upload URL

`POST /sources/upload-url`

## Request

- Base URL: `https://apigcp.trynia.ai/v2`
- URL: `https://apigcp.trynia.ai/v2/sources/upload-url`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/nozomio-labs/apis/nia-ai-api/docs/sources/upload-url/post.ts> (a function with typed inputs; its response is checked against the schema)

Generate a signed URL for direct upload. Use the returned gcs_path in POST /v2/sources.

## Request body

- SourceUploadUrlRequest
  - `filename` string, required: Original filename (used for storage object naming)
  - `content_type` string: MIME type for upload (PDF, CSV, TSV, XLS, XLSX)

## Response `200`

Successful Response

- SourceUploadUrlResponse
  - `upload_url` string, required: Signed URL for direct upload (HTTP PUT)
  - `gcs_path` string, required: GCS path to pass to create-source payload
  - `expires_in_seconds` integer, required: Signed URL expiration in seconds

## Other responses

- `422`: Validation Error

## Changes

- **2026-02-19** `c41dcb6ac8f7`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/nozomio-labs/apis/nia-ai-api/changes/sources/upload-url/post.md)

---

[API](https://skmtc.dev/nozomio-labs/apis/nia-ai-api.md) - [All operations](https://skmtc.dev/nozomio-labs/apis/nia-ai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nozomio-labs/apis/nia-ai-api/revisions/dbb602a3ef17?raw)
