Entry point for the high-level ExDaytona SDK facade.
Wraps the generated low-level connection with idiomatic defaults: the API
key comes from the :api_key option or the DAYTONA_API_KEY environment
variable, and every facade function returns {:ok, value} or
{:error, %ExDaytona.Error{}} — never the raw openapi-generator response
conventions.
{:ok, client} = ExDaytona.Client.new()
{:ok, sandbox} = ExDaytona.Sandbox.create(client, snapshot: "...")The generated ExDaytona.Api.* modules remain available for the long tail
of endpoints the facade doesn't cover — build a connection for them with
conn/1.
Summary
Functions
The platform base URL this client targets, resolved the same way
ExDaytona.Connection.new/1 resolves it (explicit option, then the
:base_url application env, then the production default).
The underlying Tesla client, for calling generated ExDaytona.Api.*
functions the facade doesn't cover
Build a client for the Daytona platform API.
Same as new/1, but raises ArgumentError when no API key is available.
Types
@type t() :: %ExDaytona.Client{ api_key: String.t(), conn: Tesla.Env.client(), options: keyword() }
A configured SDK client.
conn— the underlying Tesla client for the main platform APIapi_key— the Daytona API key (also used for toolbox connections)options— the connection options the client was built with (minusbase_url/bearer_token), reused when deriving toolbox connections
Functions
The platform base URL this client targets, resolved the same way
ExDaytona.Connection.new/1 resolves it (explicit option, then the
:base_url application env, then the production default).
@spec conn(t()) :: Tesla.Env.client()
The underlying Tesla client, for calling generated ExDaytona.Api.*
functions the facade doesn't cover:
{:ok, client} = ExDaytona.Client.new()
ExDaytona.Api.Snapshots.get_all_snapshots(ExDaytona.Client.conn(client))
@spec new(keyword()) :: {:ok, t()} | {:error, ExDaytona.Error.t()}
Build a client for the Daytona platform API.
Options
:api_key— Daytona API key (default: theDAYTONA_API_KEYenvironment variable)- all other options are passed through to
ExDaytona.Connection.new/1(:base_url,:retry,:timeout,:middleware, ...)
Returns {:error, %ExDaytona.Error{}} when no API key is available.
Same as new/1, but raises ArgumentError when no API key is available.