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

# Get PDF upload URL

`POST /sources/upload-url`

Generate a signed URL for direct PDF 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

---

[API](https://skmtc.net/trynia/apis/nia-ai-api.md) · [All operations](https://skmtc.net/trynia/apis/nia-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/trynia/nia-ai-api/versions/d216ffc3efb6/schema)
