Skip to main content
POST
/
v1
/
namespaces
/
{namespace_id}
/
models
Upload a custom model
curl --request POST \
  --url https://api.mixpeek.com/v1/namespaces/{namespace_id}/models \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form 'name=<string>' \
  --form 'version=<string>' \
  --form model_format=safetensors \
  --form 'framework=<string>' \
  --form 'task_type=<string>' \
  --form num_cpus=1 \
  --form num_gpus=0 \
  --form memory_gb=4
{
  "success": true,
  "model_id": "<string>",
  "deployment_status": "deployed",
  "endpoint": "<string>",
  "model_archive_url": "<string>"
}

Headers

Authorization
string

REQUIRED: Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings.

Examples:

"Bearer YOUR_API_KEY"

"Bearer YOUR_STRIPE_API_KEY"

Path Parameters

namespace_id
string
required

Body

multipart/form-data
file
file
required

Model archive (.tar.gz)

name
string
required

Model name

version
string
required

Model version

model_format
enum<string>
required

Model format

Available options:
safetensors,
onnx,
pytorch,
huggingface
framework
string | null

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

task_type
string | null

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

num_cpus
number
default:1

CPU requirements

num_gpus
integer
default:0

GPU requirements

memory_gb
number
default:4

Memory in GB

Response

Successful Response

Response model for model upload.

success
boolean
required

Whether upload succeeded

model_id
string
required

Unique model identifier

deployment_status
enum<string>
required

Deployment status

Available options:
deployed,
pending,
failed,
not_deployed
endpoint
string
required

Model inference endpoint

model_archive_url
string
required

S3 URL where archive is stored