Prepare a model upload
Authorizations
Pass your Baseten API key. Clients automatically send Authorization: Bearer <key>. Direct callers can also use Authorization: Api-Key <key>; both schemes are 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.
If true, validate a development-deployment push. Only valid when name is set. The following deployment fields must be left at their defaults: environment_name, preserve_env_instance_type, deployment_name.
Response
Response from POST /v1/prepare_model_upload.
On success with dry_run=false, returns STS upload credentials. On success
with dry_run=true, creds, s3_bucket, and s3_key are null and only
validation has run.
STS credentials to upload the model archive.
S3 bucket the credentials are scoped to.
S3 key the credentials are scoped to. Pass this to POST /v1/models (in the model_archive source) once the upload completes.
AWS region the S3 bucket resides in.