Promptic

Create a presigned upload

Reserves an AI Application-scoped storage object and returns a short-lived direct-upload descriptor. Upload the file bytes straight to `uploadUrl` using the returned `method`, `headers`, and `fields`; the file never passes through Promptic. After uploading, POST to /storage-objects/{id}/complete to validate the actual stored size and MIME type. Declared size is not recorded as actual usage. Defaults to private access. MIME types are checked before signing: artifacts and benchmarks folders accept PDF, PNG, JPEG, WebP, plain text, CSV, Markdown, JSON, DOCX, and XLSX. Other folders additionally accept binary (application/octet-stream), PPTX, ZIP, GIF, SVG, and HTML. Media type matching is case-insensitive and ignores MIME parameters. Unsupported types return 400.

POST
/storage-objects/presign

Reserves an AI Application-scoped storage object and returns a short-lived direct-upload descriptor. Upload the file bytes straight to uploadUrl using the returned method, headers, and fields; the file never passes through Promptic. After uploading, POST to /storage-objects/{id}/complete to validate the actual stored size and MIME type. Declared size is not recorded as actual usage. Defaults to private access. MIME types are checked before signing: artifacts and benchmarks folders accept PDF, PNG, JPEG, WebP, plain text, CSV, Markdown, JSON, DOCX, and XLSX. Other folders additionally accept binary (application/octet-stream), PPTX, ZIP, GIF, SVG, and HTML. Media type matching is case-insensitive and ignores MIME parameters. Unsupported types return 400.

Authorization

BearerApiKey
AuthorizationBearer <token>

API key from AI Application settings

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/v1/storage-objects/presign" \  -H "Content-Type: application/json" \  -d '{    "folder": "string",    "filename": "string",    "contentType": "string"  }'
{
  "storageObjectId": "7f5af0cf-fc95-42d7-a16f-f40e471a1b60",
  "access": "public",
  "strategy": "url",
  "provider": "s3",
  "uploadUrl": "string",
  "finalUrl": "string",
  "method": "PUT",
  "headers": {
    "property1": "string",
    "property2": "string"
  },
  "fields": {
    "property1": "string",
    "property2": "string"
  },
  "maxSizeBytes": 0,
  "expiresAt": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}