ApiClient

class baseten.client.sandboxapi.ApiClient(http_client, *, base_url=None, auth=None, headers=None, timeout=None)

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)

  • base_url (str | None)

  • auth (httpx.Auth | None)

  • headers (Mapping[str, str] | None)

  • timeout (httpx.Timeout | None)

delete_drives_mount(*, mount_path)

Detach a drive from a local path

Parameters:

mount_path (str)

Return type:

DriveUnmountResponse

delete_filesystem(*, path, params=None)

Delete file or directory

Parameters:
Return type:

SuccessResponse

delete_filesystem_multipart_abort(*, upload_id)

Abort multipart upload

Parameters:

upload_id (str)

Return type:

SuccessResponse

delete_filesystem_tree(*, path, params=None)

Delete directory tree

Parameters:
Return type:

SuccessResponse

delete_network_process_monitor(*, pid)

Stop monitoring ports for a process

Parameters:

pid (str)

Return type:

DeleteNetworkProcessMonitorResponse

delete_network_tunnel()

Disconnect tunnel

Return type:

SuccessResponse

delete_process(*, identifier)

Stop a process

Parameters:

identifier (str)

Return type:

SuccessResponse

delete_process_kill(*, identifier)

Kill a process

Parameters:

identifier (str)

Return type:

SuccessResponse

delete_process_stdin(*, identifier)

Close a process’s stdin

Parameters:

identifier (str)

Return type:

SuccessResponse

get_archive_status()

Get the archive status

Return type:

QuiesceStatus

get_codegen_reranking(*, path, params)

Code reranking/semantic search

Parameters:
Return type:

RerankingResponse

get_drives_mount()

List currently mounted drives

Return type:

DriveListResponse

get_filesystem(*, path, params=None)

Get file or directory information

Parameters:
Return type:

GetFilesystemResponse

Search for text content in files

Parameters:
Return type:

ContentSearchResponse

get_filesystem_find(*, path, params=None)

Find files and directories

Parameters:
Return type:

FindResponse

get_filesystem_multipart()

List multipart uploads

Return type:

MultipartListUploadsResponse

get_filesystem_multipart_parts(*, upload_id)

List parts

Parameters:

upload_id (str)

Return type:

MultipartListPartsResponse

get_filesystem_raw(*, path, params=None, accept)

Get file or directory information. Returns the response unread, in the requested content type. The caller must close the response.

Parameters:
Return type:

Response

Fuzzy search for files and directories

Parameters:
Return type:

FuzzySearchResponse

get_filesystem_tree(*, path, params=None)

Get directory tree

Parameters:
Return type:

Directory

get_health()

Health check

Return type:

HealthResponse

get_network_process_ports(*, pid)

Get open ports for a process

Parameters:

pid (str)

Return type:

GetNetworkProcessPortsResponse

get_process()

List all processes

Return type:

GetProcessResponse

get_process_identifier(*, identifier)

Get process by identifier

Parameters:

identifier (str)

Return type:

ProcessResponse

get_process_logs(*, identifier)

Get process logs

Parameters:

identifier (str)

Return type:

ProcessLogs

get_process_logs_stream(*, identifier, accept)

Stream process logs in real time. Returns the response unread, in the requested content type. The caller must close the response.

Parameters:
  • identifier (str)

  • accept (Literal['application/x-ndjson', 'text/plain'])

Return type:

Response

get_watch_filesystem(*, path, params=None)

Stream file modification events in a directory. Returns the response unread. The caller must close the response.

Parameters:
Return type:

Response

head_filesystem(*, path)

Stat a file or directory. Returns the response unread, since its headers are the result. The caller must close the response.

Parameters:

path (str)

Return type:

Response

post_archive_export(*, request)

Export the filesystem changes to a presigned URL

Parameters:

request (ExportOptions)

Return type:

ExportResult | ExportProgress

post_archive_resume()

Lift the archive freeze

Return type:

QuiesceStatus

post_drives_mount(*, request)

Attach a drive to a local path

Parameters:

request (DriveMountRequest)

Return type:

DriveMountResponse

post_environment_reload()

Reload environment from guest metadata

Return type:

HandlerReloadResponse

post_filesystem_multipart_complete(*, upload_id, request)

Complete multipart upload

Parameters:
Return type:

SuccessResponse

post_filesystem_multipart_initiate(*, path, request)

Initiate multipart upload

Parameters:
Return type:

MultipartInitiateResponse

post_network_process_monitor(*, pid, request)

Start monitoring ports for a process

Parameters:
Return type:

PostNetworkProcessMonitorResponse

post_process(*, request)

Execute a command

Parameters:

request (ProcessRequest)

Return type:

ProcessResponse

post_process_raw(*, request, accept)

Execute a command. Returns the response unread, in the requested content type. The caller must close the response.

Parameters:
Return type:

Response

post_process_stdin(*, identifier, content)

Write to a process’s stdin

Parameters:
Return type:

SuccessResponse

post_upgrade(*, request)

Upgrade the sandbox-api

Parameters:

request (UpgradeRequest)

Return type:

SuccessResponse

put_codegen_fastapply(*, path, request)

Apply code edit

Parameters:
Return type:

ApplyEditResponse

put_filesystem(*, path, request)

Create or update a file or directory

Parameters:
Return type:

SuccessResponse

put_filesystem_multipart_part(*, upload_id, params, files)

Upload part. files is sent as httpx files.

Parameters:
Return type:

MultipartUploadPartResponse

put_filesystem_tree(*, path, request)

Create or update directory tree

Parameters:
Return type:

Directory

put_network_tunnel_config(*, request)

Update tunnel configuration

Parameters:

request (TunnelConfigRequest)

Return type:

SuccessResponse