Getting Started

Quickstart

Go from an empty directory to your first translated or summarized document in 5 minutes.

This tutorial walks you through minting your developer key, obtaining a signed GCS upload URL, dispatching a document translation job, and polling for the result.

1

Mint an API Key

Sign in to the developer console at dev.manthanai.in/keys and create a key with jobs:write and jobs:read scopes. Copy your raw secret immediately (e.g. tp_test_...).

2

Request a Signed Upload URL

Call POST /v1/uploads with your document filename and MIME content type. The response includes an uploadId and a short-lived PUT URL.

curl -X POST https://transpera-api-dev-vv55i7vbvq-el.a.run.app/v1/uploads \
  -H "authorization: Bearer tp_test_your_key_here" \
  -H "content-type: application/json" \
  -d '{
    "fileName": "annual-report.pdf",
    "contentType": "application/pdf"
  }'
3

Upload the File via HTTP PUT

Upload the binary file directly to Google Cloud Storage using the signed URL. No authorization header is needed for the upload step.

curl -X PUT "SIGNED_UPLOAD_URL" \
  -H "content-type: application/pdf" \
  --data-binary @annual-report.pdf
4

Dispatch the Job

Call POST /v1/jobs with your uploadId, operation, and an Idempotency-Key header. Credits are asserted before enqueueing.

curl -X POST https://transpera-api-dev-vv55i7vbvq-el.a.run.app/v1/jobs \
  -H "authorization: Bearer tp_test_your_key_here" \
  -H "content-type: application/json" \
  -H "idempotency-key: $(uuidgen)" \
  -d '{
    "operation": "document.translate",
    "input": {
      "uploadId": "YOUR_UPLOAD_ID",
      "targetLanguage": "French",
      "tone": "professional"
    }
  }'
5

Check Status & Receive Output

Poll GET /v1/jobs/{id} until status is succeeded, or provide a webhookUrl in step 4 to receive an instant signed HTTP callback.

curl https://transpera-api-dev-vv55i7vbvq-el.a.run.app/v1/jobs/YOUR_JOB_ID \
  -H "authorization: Bearer tp_test_your_key_here"