Skip to main content

Core Client - Python SDK

Overview​

Available Operations​

MethodDescription
client.me()Read the current authenticated identity.
client.request(method, path, ...)Send an advanced authenticated JSON request.
client.request_raw(method, path, ...)Send an advanced authenticated text or file request.
client.get_token()Ensure authentication and return the current bearer token.
client.close()Release the underlying HTTP connection pool.

client.me​

Read the current authenticated identity.

Request​

This method has no parameters and sends no request body.

Response​

Identity dictionary from /api/v1/auth/me.

client.request​

Send an advanced authenticated JSON request.

Request​

method: str, path: str; optional json, params, timeout.

Response​

Complete {code, message, errorCode, details, data} envelope.

client.request_raw​

Send an advanced authenticated text or file request.

Request​

method, path; optional json, content, content_type, params, timeout.

Response​

httpx.Response; caller chooses text, bytes, or streaming access.

client.get_token​

Ensure authentication and return the current bearer token.

Request​

This method has no parameters and sends no request body.

Response​

str. Treat as a secret.

client.close​

Release the underlying HTTP connection pool.

Request​

This method has no parameters and sends no request body.

Response​

None.

Field Reference and Examples​

me = client.me()
envelope = client.request("GET", "/api/v1/models", params={"page": 1})
raw = client.request_raw("GET", "/api/v1/services/42/yaml")
token = client.get_token()
client.close()

Use resource methods instead of request(...) for normal integrations. The generic methods exist for forward-compatible access to a server endpoint that has not yet been promoted into the public SDK surface.

All methods use the shared authentication and typed error behavior described in Response Conventions and Retry and Security.