Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

Send Authorization: Bearer <api_key>. The legacy Authorization: Api-Key <api_key> scheme is also accepted.

Body

application/json

Body for POST /v1/prepare_model_upload.

Validates the same payload the commit endpoint will validate, and on dry_run=false issues STS upload credentials. Exactly one of name or model_id is required: name validates the new-model path (POST /v1/models); model_id validates the add-deployment path (POST /v1/models/{model_id}/deployments).

deployment
DeploymentArchivePayloadV1 · object
required

Deployment-level payload, identical to the payload sent at commit.

name
string | null

Set to validate a new-model push. Exactly one of name or model_id is required.

team_id
string | null

Team the new model will belong to. Only valid when name is set; defaults to the organization's default team when omitted. Must not be set when model_id is set (the existing model already has a team).

model_id
string | null

Set to validate an add-deployment push to an existing model. Exactly one of name or model_id is required.

dry_run
boolean
default:false

If true, validate the payload only and do not issue upload credentials. The response sets creds, s3_bucket, and s3_key to null.

Response

200 - application/json

Response from POST /v1/prepare_model_upload.

Returns STS upload credentials when the push requires an archive upload. All four fields (creds, s3_bucket, s3_key, s3_region) are null when no upload is needed: either dry_run=true (validation only) or a model format that is not built from an uploaded archive (for example, BIS-LLM, which is built from its config alone).

creds
AWSCredentialsV1 · object | null

STS credentials to upload the model archive. Null when no archive upload is required.

s3_bucket
string | null

S3 bucket the credentials are scoped to. Null when no archive upload is required.

s3_key
string | null

S3 key the credentials are scoped to. Pass this to POST /v1/models (in the model_archive source) once the upload completes. Null when no archive upload is required.

s3_region
string | null

AWS region the S3 bucket resides in. Null when no archive upload is required.