Prepare a model upload
Authorizations
Send Authorization: Bearer <api_key>. The legacy Authorization: Api-Key <api_key> scheme is also accepted.
Body
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-level payload, identical to the payload sent at commit.
Set to validate a new-model push. Exactly one of name or model_id is required.
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).
Set to validate an add-deployment push to an existing model. Exactly one of name or model_id is required.
If true, validate the payload only and do not issue upload credentials. The response sets creds, s3_bucket, and s3_key to null.
Response
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).
STS credentials to upload the model archive. Null when no archive upload is required.
S3 bucket the credentials are scoped to. Null when no archive upload is required.
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.
AWS region the S3 bucket resides in. Null when no archive upload is required.