ApiClient

class baseten.client.managementapi.ApiClient(http_client)

Bases: object

Generated HTTP client for the Baseten API.

Methods on this client are generated from the OpenAPI specification and are NOT covered by any stability or compatibility guarantees. They may change without notice between versions.

Parameters:

http_client (httpx.Client)

delete_api_keys(*, api_key_prefix)

Deletes an API key by prefix

Parameters:

api_key_prefix (str)

Return type:

APIKeyTombstone

delete_chains(*, chain_id)

Deletes a chain by ID

Parameters:

chain_id (str)

Return type:

ChainTombstone

delete_chains_deployments(*, chain_id, chain_deployment_id)

Deletes a chain deployment by ID

Parameters:
  • chain_id (str)

  • chain_deployment_id (str)

Return type:

ChainDeploymentTombstone

delete_library_listings(*, user_defined_listing_id)

Deletes a library listing

Parameters:

user_defined_listing_id (str)

Return type:

LibraryListingTombstone

delete_library_listings_versions(*, user_defined_listing_id, version_tag)

Deletes a library listing version

Parameters:
  • user_defined_listing_id (str)

  • version_tag (str)

Return type:

LibraryListingVersionTombstone

delete_models(*, model_id)

Deletes a model by ID

Parameters:

model_id (str)

Return type:

ModelTombstone

delete_models_deployments(*, model_id, deployment_id)

Deletes a model’s deployment by ID

Parameters:
  • model_id (str)

  • deployment_id (str)

Return type:

DeploymentTombstone

delete_models_deployments_replicas(*, model_id, deployment_id, replica_id)

Terminates a replica in a deployment

Parameters:
  • model_id (str)

  • deployment_id (str)

  • replica_id (str)

Return type:

TerminateReplicaResponse

delete_secrets(*, secret_name)

Deletes a secret by name

Parameters:

secret_name (str)

Return type:

SecretTombstone

delete_teams_secrets(*, team_id, secret_name)

Deletes a secret by name

Parameters:
  • team_id (str)

  • secret_name (str)

Return type:

SecretTombstone

delete_training_projects(*, training_project_id)

Delete a training project.

Parameters:

training_project_id (str)

Return type:

TrainingProjectTombstone

delete_training_projects_jobs(*, training_project_id, training_job_id)

Delete a training job.

Parameters:
  • training_project_id (str)

  • training_job_id (str)

Return type:

TrainingJobTombstone

get_api_keys()

Lists the user’s API keys (metadata only, no plain text keys)

Return type:

APIKeys

get_billing_usage_summary()

Gets billing usage summary for a date range

Return type:

UsageSummary

get_blobs_credentials_model()

Get blob credentials for models.

Return type:

GetBlobCredentialsResponse

get_blobs_credentials_train()

Get blob credentials for training.

Return type:

GetBlobCredentialsResponse

get_chains()

Gets all chains

Return type:

Chains

get_chains_chain_id(*, chain_id)

Gets a chain by ID

Parameters:

chain_id (str)

Return type:

Chain

get_chains_deployments(*, chain_id)

Gets all chain deployments

Parameters:

chain_id (str)

Return type:

ChainDeployments

get_chains_deployments_chain_deployment_id(*, chain_id, chain_deployment_id)

Gets a chain deployment by ID

Parameters:
  • chain_id (str)

  • chain_deployment_id (str)

Return type:

ChainDeployment

get_chains_deployments_chainlets_logs(*, chain_id, chain_deployment_id, chainlet_id)

Gets the logs for a chainlet within a chain deployment.

Parameters:
  • chain_id (str)

  • chain_deployment_id (str)

  • chainlet_id (str)

Return type:

GetLogsResponse

get_chains_environments(*, chain_id)

Get all chain environments

Parameters:

chain_id (str)

Return type:

Environments

get_chains_environments_env_name(*, chain_id, env_name)

Get a chain environment’s details

Parameters:
  • chain_id (str)

  • env_name (str)

Return type:

ChainEnvironment

get_gateway_groups()

List groups

Return type:

GroupsResponse

get_gateway_groups_api_keys(*, group_id)

List API keys for a group

Parameters:

group_id (str)

Return type:

KeysForGroupResponse

get_gateway_groups_api_keys_api_key_prefix(*, group_id, api_key_prefix)

Get an API key for a group

Parameters:
  • group_id (str)

  • api_key_prefix (str)

Return type:

GatewayKeyInfo

get_gateway_groups_group_id(*, group_id)

Get a group

Parameters:

group_id (str)

Return type:

Group

get_instance_type_prices()

Gets prices for available instance types.

Return type:

InstanceTypePrices

get_instance_types()

Gets all available instance types

Return type:

InstanceTypes

get_library_listings()

Gets all library listings

Return type:

LibraryListings

get_library_listings_user_defined_listing_id(*, user_defined_listing_id)

Gets a library listing

Parameters:

user_defined_listing_id (str)

Return type:

LibraryListing

get_library_listings_versions(*, user_defined_listing_id)

Gets all versions for a library listing

Parameters:

user_defined_listing_id (str)

Return type:

LibraryListingVersions

get_library_listings_versions_version_tag(*, user_defined_listing_id, version_tag)

Gets a library listing version

Parameters:
  • user_defined_listing_id (str)

  • version_tag (str)

Return type:

LibraryListingVersion

get_loops_capabilities()

Get Loops server capabilities.

Return type:

GetLoopsCapabilitiesResponse

get_loops_checkpoints()

List Loops checkpoints.

Return type:

ListLoopsCheckpointsResponse

get_loops_checkpoints_files(*, checkpoint_id)

Get Loops checkpoint files.

Parameters:

checkpoint_id (str)

Return type:

LoopsCheckpointFilesResponse

get_loops_deployments()

List Loops deployments.

Return type:

ListLoopsDeploymentsResponse

get_loops_deployments_deployment_id(*, deployment_id)

Get a Loops deployment.

Parameters:

deployment_id (str)

Return type:

GetLoopsDeploymentResponse

get_loops_deployments_logs(*, deployment_id)

Get logs for a Loops trainer deployment.

Parameters:

deployment_id (str)

Return type:

GetLogsResponse

get_loops_runs()

List Loops runs.

Return type:

ListLoopsRunsResponse

get_loops_runs_run_id(*, run_id)

Get a Loops run.

Parameters:

run_id (str)

Return type:

GetLoopsRunResponse

get_loops_samplers()

List Loops samplers.

Return type:

ListLoopsSamplersResponse

get_loops_samplers_sampler_id(*, sampler_id)

Get a Loops sampler.

Parameters:

sampler_id (str)

Return type:

GetLoopsSamplerResponse

get_loops_sessions(*, session_id)

Get a Loops session.

Parameters:

session_id (str)

Return type:

GetLoopsSessionResponse

get_model_apis_snapshots()

Get the latest model weight snapshot

Return type:

ModelWeightSnapshot

get_model_apis_snapshots_model_id(*, model_id)

Get the latest model weight snapshot

Parameters:

model_id (str)

Return type:

ModelWeightSnapshot

get_models()

Gets all models

Return type:

Models

get_models_deployments(*, model_id)

Gets all deployments of a model

Parameters:

model_id (str)

Return type:

Deployments

get_models_deployments_config(*, model_id, deployment_id)

Gets a deployment’s config

Parameters:
  • model_id (str)

  • deployment_id (str)

Return type:

DeploymentConfigResponse

get_models_deployments_deployment_id(*, model_id, deployment_id)

Gets a model’s deployment by ID

Parameters:
  • model_id (str)

  • deployment_id (str)

Return type:

Deployment

get_models_deployments_development(*, model_id)

Gets a model’s development deployment

Parameters:

model_id (str)

Return type:

Deployment

get_models_deployments_download(*, model_id, deployment_id)

Gets a presigned download URL for a deployment’s truss

Parameters:
  • model_id (str)

  • deployment_id (str)

Return type:

DownloadDeploymentResponse

get_models_deployments_logs(*, model_id, deployment_id)

Gets the logs for a model deployment.

Parameters:
  • model_id (str)

  • deployment_id (str)

Return type:

GetLogsResponse

get_models_deployments_production(*, model_id)

Gets a model’s production deployment

Parameters:

model_id (str)

Return type:

Deployment

get_models_environments(*, model_id)

Get all environments

Parameters:

model_id (str)

Return type:

Environments

get_models_environments_env_name(*, model_id, env_name)

Get an environment’s details

Parameters:
  • model_id (str)

  • env_name (str)

Return type:

Environment

get_models_model_id(*, model_id)

Gets a model by ID

Parameters:

model_id (str)

Return type:

Model

get_secrets()

Gets all secrets (metadata only, no plain text keys)

Return type:

Secrets

get_teams()

Lists all teams

Return type:

Teams

get_teams_models(*, team_id)

Gets all models

Parameters:

team_id (str)

Return type:

Models

get_teams_secrets(*, team_id)

Gets all secrets for a team (metadata only, no plain text keys)

Parameters:

team_id (str)

Return type:

Secrets

get_trainer_sessions_trainers_checkpoints(*, session_id, trainer_id)

List trainer server checkpoints.

Parameters:
  • session_id (str)

  • trainer_id (str)

Return type:

GetTrainerServerCheckpointsResponse

get_trainer_sessions_trainers_checkpoints_files(*, session_id, trainer_id, checkpoint_id)

Get trainer server checkpoint files.

Parameters:
  • session_id (str)

  • trainer_id (str)

  • checkpoint_id (str)

Return type:

GetTrainerServerCheckpointFilesResponse

get_training_capacity()

Get training GPU capacity.

Return type:

GetTrainingGpuCapacityResponse

get_training_projects()

List training projects.

Return type:

ListTrainingProjectsResponse

get_training_projects_cache_summary(*, training_project_id)

Get training project cache summary.

Parameters:

training_project_id (str)

Return type:

GetCacheSummaryResponse

get_training_projects_jobs(*, training_project_id)

List training jobs.

Parameters:

training_project_id (str)

Return type:

ListTrainingJobsResponse

get_training_projects_jobs_auth_codes(*, training_project_id, training_job_id)

Get auth codes for a training job.

Parameters:
  • training_project_id (str)

  • training_job_id (str)

Return type:

GetAuthCodesResponse

get_training_projects_jobs_checkpoint_files(*, training_project_id, training_job_id)

Get training job checkpoint files.

Parameters:
  • training_project_id (str)

  • training_job_id (str)

Return type:

GetTrainingJobCheckpointFilesResponse

get_training_projects_jobs_checkpoints(*, training_project_id, training_job_id)

Get training job checkpoints.

Parameters:
  • training_project_id (str)

  • training_job_id (str)

Return type:

GetTrainingJobCheckpointsResponse

get_training_projects_jobs_download(*, training_project_id, training_job_id)

Get the uploaded training job as a S3 Artifact

Parameters:
  • training_project_id (str)

  • training_job_id (str)

Return type:

DownloadTrainingJobResponse

get_training_projects_jobs_logs(*, training_project_id, training_job_id)

Get the logs for a training job.

Parameters:
  • training_project_id (str)

  • training_job_id (str)

Return type:

GetLogsResponse

get_training_projects_jobs_metrics(*, training_project_id, training_job_id)

Get the metrics for a training job.

Parameters:
  • training_project_id (str)

  • training_job_id (str)

Return type:

GetTrainingJobMetricsResponse

get_training_projects_jobs_training_job_id(*, training_project_id, training_job_id)

Get a training job.

Parameters:
  • training_project_id (str)

  • training_job_id (str)

Return type:

GetTrainingJobResponse

get_training_projects_training_project_id(*, training_project_id)

Get a training project.

Parameters:

training_project_id (str)

Return type:

GetTrainingProjectResponse

get_users(*, user_id)

Gets a user by ID

Parameters:

user_id (str)

Return type:

UserInfo

patch_chains_environments(*, chain_id, env_name, body)

Update a chain environment’s settings

Parameters:
Return type:

UpdateChainEnvironmentResponse

patch_chains_environments_chainlet_settings_autoscaling_settings(*, chain_id, env_name, body)

Update a chainlet environment’s autoscaling settings

Parameters:
Return type:

UpdateAutoscalingSettingsResponse

patch_gateway_groups(*, group_id, body)

Update a group

Parameters:
Return type:

Group

patch_library_listings(*, user_defined_listing_id, body)

Updates a library listing

Parameters:
Return type:

LibraryListing

patch_library_listings_versions(*, user_defined_listing_id, version_tag, body)

Updates a library listing version

Parameters:
Return type:

LibraryListingVersion

patch_models_deployments_autoscaling_settings(*, model_id, deployment_id, body)

Updates a deployment’s autoscaling settings

Parameters:
Return type:

UpdateAutoscalingSettingsResponse

patch_models_deployments_development_autoscaling_settings(*, model_id, body)

Updates a development deployment’s autoscaling settings

Parameters:
Return type:

UpdateAutoscalingSettingsResponse

patch_models_deployments_production_autoscaling_settings(*, model_id, body)

Updates a production deployment’s autoscaling settings

Parameters:
Return type:

UpdateAutoscalingSettingsResponse

patch_models_environments(*, model_id, env_name, body)

Update an environment’s settings

Parameters:
Return type:

UpdateAutoscalingSettingsResponse

patch_training_projects_jobs_interactive_sessions(*, training_project_id, training_job_id, session_id, body)

Patch an interactive session.

Parameters:
Return type:

PatchInteractiveSessionResponse

post_api_keys(*, body)

Creates an API key

Parameters:

body (CreateAPIKeyRequest)

Return type:

APIKey

post_chains_deployments_deactivate(*, chain_id, chain_deployment_id)

Deactivates a chain deployment

Parameters:
  • chain_id (str)

  • chain_deployment_id (str)

Return type:

DeactivateResponse

post_chains_environments(*, chain_id, body)

Create a chain environment

Parameters:
Return type:

ChainEnvironment

post_chains_environments_chainlet_settings_instance_types_update(*, chain_id, env_name, body)

Update a chainlet environment’s instance type settings.

Parameters:
Return type:

UpdateChainletEnvironmentInstanceTypeResponse

post_chains_environments_promote(*, chain_id, env_name, body)

Promotes a chain deployment to an environment

Parameters:
Return type:

ChainDeployment

post_gateway_groups(*, body)

Create a group

Parameters:

body (CreateGroupRequest)

Return type:

Group

post_gateway_groups_api_keys(*, group_id, body)

Create an API key for a group

Parameters:
Return type:

CreateApiKeyForGroupResponse

post_gateway_groups_api_keys_register(*, group_id, body)

Register an API key for a group

Parameters:
Return type:

RegisterAPIKeyResponse

post_library_listings(*, body)

Creates a new library listing

Parameters:

body (CreateLibraryListingRequest)

Return type:

LibraryListing

post_library_listings_versions(*, user_defined_listing_id, body)

Creates a new library listing version

Parameters:
Return type:

LibraryListingVersion

post_llm_models(*, body)

Creates a new BIS LLM deployment

Parameters:

body (CreateLLMModelRequest)

Return type:

LLMModelHandle

post_llm_models_deployments(*, model_id, body)

Creates a new BIS LLM deployment version

Parameters:
Return type:

LLMModelHandle

post_loops_checkpoints_validate(*, body)

Validate a Loops checkpoint bt:// URI.

Parameters:

body (ValidateLoopsCheckpointRequest)

Return type:

ValidateLoopsCheckpointResponse

post_loops_deployments_deactivate(*, deployment_id)

Deactivate a Loops deployment.

Parameters:

deployment_id (str)

Return type:

DeactivateLoopsDeploymentResponse

post_loops_deployments_metrics(*, deployment_id, body)

Get metrics for a Loops trainer deployment.

Parameters:
Return type:

GetLoopsDeploymentMetricsResponse

post_loops_runs(*, body)

Create a Loops run.

Parameters:

body (CreateLoopsRunRequest)

Return type:

CreateLoopsRunResponse

post_loops_samplers(*, body)

Create a Loops sampler.

Parameters:

body (CreateLoopsSamplerRequest)

Return type:

CreateLoopsSamplerResponse

post_loops_sessions(*, body)

Create a Loops session.

Parameters:

body (CreateLoopsSessionRequest)

Return type:

CreateLoopsSessionResponse

post_model_apis_snapshots(*, body)

Create a model weight snapshot

Parameters:

body (CreateModelWeightSnapshotRequest)

Return type:

ModelWeightSnapshot

post_model_apis_snapshots_model_id(*, model_id, body)

Create a model weight snapshot

Parameters:
Return type:

ModelWeightSnapshot

post_models(*, body)

Creates a new model from a source

Parameters:

body (CreateModelRequest)

Return type:

CreatedModelDeployment

post_models_deployments(*, model_id, body)

Adds a new deployment to a model

Parameters:
Return type:

CreatedModelDeployment

post_models_deployments_activate(*, model_id, deployment_id)

Activates a deployment

Parameters:
  • model_id (str)

  • deployment_id (str)

Return type:

ActivateResponse

post_models_deployments_deactivate(*, model_id, deployment_id)

Deactivates a deployment

Parameters:
  • model_id (str)

  • deployment_id (str)

Return type:

DeactivateResponse

post_models_deployments_development_activate(*, model_id)

Activates a development deployment

Parameters:

model_id (str)

Return type:

ActivateResponse

post_models_deployments_development_deactivate(*, model_id)

Deactivates a development deployment

Parameters:

model_id (str)

Return type:

DeactivateResponse

post_models_deployments_development_promote(*, model_id, body)

Promotes a development deployment to production

Parameters:
Return type:

Deployment

post_models_deployments_development_retry(*, model_id)

Retries a failed development deployment

Parameters:

model_id (str)

Return type:

RetryDeploymentResponse

post_models_deployments_logs(*, model_id, deployment_id, body)

Gets the logs for a model deployment (deprecated; use GET).

Parameters:
Return type:

GetLogsResponse

post_models_deployments_production_activate(*, model_id)

Activates a production deployment

Parameters:

model_id (str)

Return type:

ActivateResponse

post_models_deployments_production_deactivate(*, model_id)

Deactivates a production deployment

Parameters:

model_id (str)

Return type:

DeactivateResponse

post_models_deployments_production_retry(*, model_id)

Retries a failed production deployment

Parameters:

model_id (str)

Return type:

RetryDeploymentResponse

post_models_deployments_promote(*, model_id, deployment_id, body)

Promotes a deployment to production

Parameters:
Return type:

Deployment

post_models_deployments_retry(*, model_id, deployment_id)

Retries a failed deployment

Parameters:
  • model_id (str)

  • deployment_id (str)

Return type:

RetryDeploymentResponse

post_models_deployments_ssh_sign(*, model_id, deployment_id, body)

Sign an SSH certificate for an inference model.

Parameters:
Return type:

SignSSHCertificateResponse

post_models_environments(*, model_id, body)

Create an environment

Parameters:
Return type:

Environment

post_models_environments_activate(*, model_id, env_name)

Activates a deployment associated with an environment

Parameters:
  • model_id (str)

  • env_name (str)

Return type:

ActivateResponse

post_models_environments_cancel_promotion(*, model_id, env_name)

Cancels a promotion to an environment

Parameters:
  • model_id (str)

  • env_name (str)

Return type:

CancelPromotionResponse

post_models_environments_deactivate(*, model_id, env_name)

Deactivates a deployment associated with an environment

Parameters:
  • model_id (str)

  • env_name (str)

Return type:

DeactivateResponse

post_models_environments_force_cancel_promotion(*, model_id, env_name)

Force cancels a rolling promotion

Parameters:
  • model_id (str)

  • env_name (str)

Return type:

SignalPromotionResponse

post_models_environments_force_roll_forward_promotion(*, model_id, env_name)

Force rolls forward a rolling promotion

Parameters:
  • model_id (str)

  • env_name (str)

Return type:

SignalPromotionResponse

post_models_environments_pause_promotion(*, model_id, env_name)

Pauses a rolling promotion

Parameters:
  • model_id (str)

  • env_name (str)

Return type:

SignalPromotionResponse

post_models_environments_promote(*, model_id, env_name, body)

Promotes a deployment to an environment

Parameters:
Return type:

Deployment

post_models_environments_resume_promotion(*, model_id, env_name)

Resumes a paused rolling promotion

Parameters:
  • model_id (str)

  • env_name (str)

Return type:

SignalPromotionResponse

post_prepare_model_upload(*, body)

Validates a model push payload and issues upload credentials

Parameters:

body (PrepareModelUploadRequest)

Return type:

PrepareModelUploadResponse

post_secrets(*, body)

Upserts a secret

Parameters:

body (UpsertSecretRequest)

Return type:

Secret

post_teams_api_keys(*, team_id, body)

Creates a team API key

Parameters:
Return type:

APIKey

post_teams_llm_models(*, team_id, body)

Creates a new BIS LLM deployment

Parameters:
Return type:

LLMModelHandle

post_teams_models(*, team_id, body)

Creates a new model from a source

Parameters:
Return type:

CreatedModelDeployment

post_teams_secrets(*, team_id, body)

Upserts a secret in a team

Parameters:
Return type:

Secret

post_teams_training_projects(*, team_id, body)

Upsert a training project in a specific team.

Parameters:
Return type:

UpsertTrainingProjectResponse

post_trainer_sessions(*, body)

Create a trainer session.

Parameters:

body (CreateTrainerSessionRequest)

Return type:

CreateTrainerSessionResponse

post_trainer_sessions_samplers(*, session_id, body)

Create a sampling server.

Parameters:
Return type:

CreateSamplingServerResponse

post_trainer_sessions_trainers(*, session_id, body)

Create a trainer server.

Parameters:
Return type:

CreateTrainerServerResponse

Look up trainer checkpoint info by bt:// URI.

Parameters:

body (CheckpointSearchRequest)

Return type:

CheckpointSearchResponse

Search trainers.

Parameters:

body (SearchTrainersRequest)

Return type:

SearchTrainersResponse

Search training jobs.

Parameters:

body (SearchTrainingJobsRequest)

Return type:

SearchTrainingJobsResponse

post_training_projects(*, body)

Upsert a training project.

Parameters:

body (UpsertTrainingProjectRequest)

Return type:

UpsertTrainingProjectResponse

post_training_projects_jobs(*, training_project_id, body)

Create a training job.

Parameters:
Return type:

CreateTrainingJobResponse

post_training_projects_jobs_logs(*, training_project_id, training_job_id, body)

Get the logs for a training job (deprecated; use GET).

Parameters:
Return type:

GetLogsResponse

post_training_projects_jobs_metrics(*, training_project_id, training_job_id, body)

Get the metrics for a training job (deprecated; use GET).

Parameters:
Return type:

GetTrainingJobMetricsResponse

post_training_projects_jobs_recreate(*, training_project_id, training_job_id)

Recreate a training job

Parameters:
  • training_project_id (str)

  • training_job_id (str)

Return type:

RecreateTrainingJobResponse

post_training_projects_jobs_ssh_sign(*, training_project_id, training_job_id, body)

Sign an SSH certificate for a training job.

Parameters:
Return type:

SignSSHCertificateResponse

post_training_projects_jobs_stop(*, training_project_id, training_job_id, body)

Stop a training job.

Parameters:
Return type:

StopTrainingJobResponse