Skip to main content
POST
/
sources
/
upload-url
Get PDF upload URL
curl --request POST \
  --url https://apigcp.trynia.ai/v2/sources/upload-url \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "filename": "<string>",
  "content_type": "application/pdf"
}
'
{
  "upload_url": "<string>",
  "gcs_path": "<string>",
  "expires_in_seconds": 123
}

Authorizations

Authorization
string
header
required

API key must be provided in the Authorization header

Body

application/json
filename
string
required

Original filename (used for storage object naming)

Minimum string length: 1
content_type
string
default:application/pdf

MIME type. Currently only application/pdf is supported.

Response

Successful Response

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