Skip to main content
POST
Python (SDK)

Authorizations

Authorization
string
header
required

Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.

Headers

X-On-Behalf-Of
string

Optional external end-user identifier forwarded by the API gateway.

Body

application/json
accelerator
string
required

Curated accelerator name. GET /accelerators lists what is available.

deadline
RunDeadline · object
required

Exactly one of hours or max_usd. Cost is rate x time and the rate is fixed at acquisition, so they are interchangeable — but they are not the same number. A max_usd deadline resolves only once acquisition fixes the rate.

disk_gb
integer
required

Required, no default. Must fit the image plus whatever the script downloads; too small and the pod dies mid-download.

Required range: x >= 1
gpu_count
integer
required

Accelerators on one node. V1 is single-node: multi-node clusters are not offered by the providers we support.

Required range: 1 <= x <= 8
image
string
required

Any public image. It must contain bash, and on providers where we install sshd it must be Debian-family with apt.

kind
enum<string>
required

What the run is for. A fine-tune ends on its own and its exit code is the outcome; a deployment serves traffic and runs until it is deleted. They are one resource because they are one pod, one provider and one script — the kind selects terminal semantics, not a different machine.

Available options:
finetune,
deployment
startup_script_b64
string
required

Base64 bash. Run as a child process of our run script; its exit code is the run's outcome. Never interpreted.

env
Env · object

Environment for the workload. Keys in the MKA1_ namespace are reserved.

interconnect
string

Optional filter on intra-node topology, e.g. nvlink. Tensor-parallel work is materially slower over PCIe.

name
string
ports
string[]

Container ports to expose, e.g. "8000/http". Meaningful for a deployment, which serves traffic; a fine-tune has nothing to expose.

providers
string[]

Ordered preference, tried in turn. Rejected while provider anonymity is enabled, because the list is itself a provider-identity leak.

secrets
string[]

Stored secret ids resolved into the environment immediately before hand-off.

ssh_public_key
string

Your own public key. We never generate or hold private key material. Omit and the run has no SSH.

Response

The run, accepted and submitted for acquisition.

created_at
string<date-time>
required
id
string
required
kind
enum<string>
required

What the run is for. A fine-tune ends on its own and its exit code is the outcome; a deployment serves traffic and runs until it is deleted. They are one resource because they are one pod, one provider and one script — the kind selects terminal semantics, not a different machine.

Available options:
finetune,
deployment
state
enum<string>
required
Available options:
requested,
provisioning,
running,
succeeded,
failed,
terminated
accelerator
string
deadline_at
string<date-time>
endpoint
string

Where the workload serves, once it is running. Only a deployment declares ports, so only a deployment reports an endpoint.

exit_code
integer

The workload's exit status. Provider status is not trusted for this: one provider reports the VM rather than the container.

gpu_count
integer
image
string
name
string
price_usd_hr
number
provider
string
reason
string

Why the run is in this state, e.g. ssh_setup_failed or budget_exhausted.

ssh
RunSSH · object

Connection details. The login user is provider dependent and is read from the provider, never assumed.

started_at
string<date-time>
terminal_at
string<date-time>