Skip to main content
POST
Generate presigned URL for model upload

Authorizations

Authorization
string
header
required

Mixpeek API key, sent as Authorization: Bearer mxp_sk_.... Create one in Studio under Settings → API Keys, or with an admin key via POST /v1/organizations/users/{user_email}/api-keys. A missing, malformed, unknown, revoked, inactive or expired key returns 401; a key without the permission, scope or plan an operation needs returns 403.

Body

application/json

Keys this body does not declare are refused with 422 extra_forbidden naming the accepted keys (since 2026-11-02).

Request to generate a presigned URL for model archive upload.

This is step 1 of the presigned URL workflow:

  1. POST /models/uploads → Returns presigned_url + upload_id
  2. PUT presigned_url with model archive (client uploads directly to S3)
  3. POST /models/uploads/{upload_id}/confirm → Validates and creates model

Requirements: - name: Model name (e.g., 'my_custom_embedder') - version: Semantic version (e.g., '1.0.0') - model_format: Format of the model weights - file_size_bytes: Expected archive size for quota validation

name
string
required

Model name: 3-64 chars, letters/numbers/underscores, starts with a letter (no hyphens or spaces)

Pattern: ^[a-zA-Z][a-zA-Z0-9_]{2,63}$
Examples:

"custom_embedder"

"sentiment_model"

"image_classifier"

version
string
required

Semantic version string

Pattern: ^\d+\.\d+\.\d+$
Examples:

"1.0.0"

"2.1.3"

"0.0.1"

model_format
enum<string>
required

Format of the model weights

Available options:
safetensors,
onnx,
pytorch,
huggingface
Examples:

"safetensors"

"onnx"

"pytorch"

"huggingface"

description
string | null

Optional description of the model

Maximum string length: 500
file_size_bytes
integer | null

Expected file size in bytes for quota validation

Required range: 0 < x <= 5368709120
presigned_url_expiration
integer
default:3600

Presigned URL expiration time in seconds (1-24 hours)

Required range: 60 <= x <= 86400
resource_requirements
ModelResourceRequirements · object

Resource requirements for model deployment

framework
string | null

ML framework (e.g., sentence-transformers, transformers)

task_type
string | null

Task type (e.g., embedding, classification, generation)

source
enum<string>
default:customer

Who is uploading: 'customer' (default) or 'mixpeek' (professional services). Mixpeek-sourced models are non-exportable by default.

Available options:
customer,
mixpeek,
system

Response

Successful Response

Response containing presigned URL for model upload.

After receiving this response:

  1. PUT the model archive to presigned_url with the required_content_type header (the value the URL is signed with)
  2. Call POST /models/uploads/{upload_id}/confirm to finalize
upload_id
string
required

Upload ID to use when confirming

presigned_url
string
required

S3 presigned URL for PUT upload

s3_key
string
required

S3 object key where file will be stored

expires_at
string<date-time>
required

When the presigned URL expires

organization_id
string
required

Organization ID

name
string
required

Model name

version
string
required

Model version

model_format
enum<string>
required

Model format

Available options:
safetensors,
onnx,
pytorch,
huggingface
required_content_type
string
default:application/gzip

Content-Type the presigned PUT is signed with. Send this exact value as the Content-Type header on the upload PUT, or object storage rejects it with 403 SignatureDoesNotMatch. Parity with the extractor upload.