Skip to content
Browse API documentation

API / Files & reports

Create an upload

Get a signed URL to upload a document directly to storage. Use this flow for files larger than 4 MB, up to 50 MB.

POST/api/v1/uploads

Request body

filenamestringRequired

The document’s filename, including its real extension.

content_typestringOptional

The document’s MIME type. Inferred from the filename when omitted.

size_bytesintegerOptional

The document size in bytes. Maximum: 50 MB.

Upload the bytes

Save upload_url as UPLOAD_URL and upload_id as UPLOAD_ID. Send the exact Content-Type returned by the API. The URL expires after 10 minutes.

cURL
curl -X PUT "$UPLOAD_URL" \
  -H "Content-Type: application/pdf" \
  --data-binary @thesis.pdf

Create the check

cURL
curl -X POST https://academi.cx/api/v1/checks \
  -H "Authorization: Bearer $ACADEMICX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"upload_id":"'"$UPLOAD_ID"'","products":["ai","similarity"]}'

Uploading alone does not run a check or charge your balance. Create a check after the upload succeeds. Each upload_id can be used once, and the check is made from the bytes stored when you create it: a later PUT to the same URL changes nothing. An account can have 50 uploads waiting at once, and an upload no check is made from within 24 hours is deleted.

Example request · cURL
curl -X POST https://academi.cx/api/v1/uploads \
  -H "Authorization: Bearer $ACADEMICX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"filename":"thesis.pdf","content_type":"application/pdf"}'
Example response · 201 · Created
{
  "object": "upload",
  "upload_id": "9f1c0f52-6a9b-4b1e-9e1a-2d3c4b5a6f70",
  "upload_url": "https://storage.example/signed-upload-url",
  "expires_in": 600,
  "content_type": "application/pdf",
  "instructions": "PUT the file bytes to upload_url with Content-Type: application/pdf, then POST /v1/checks with the upload_id."
}

Base URL: https://academi.cx/api/v1