Skip to content

Delete a Function

DELETE
/apis/nodus.dev/v1/namespaces/{namespace}/functions/{name}
curl --request DELETE \
--url https://example.com/apis/nodus.dev/v1/namespaces/example/functions/example
namespace
required
string

The project.

name
required
string

The object’s name.

dryRun
string
fieldValidation
string
fieldManager
string
propagationPolicy
string
Idempotency-Key
string
If-Match
string

OK

Media type application/json

Function is a deployed Python function served by a pool of warm workers. .remote(), .spawn() and .map() create FunctionCalls, and the shared worker pool sizes the worker attempts between scaling.minWorkers and scaling.maxWorkers.

object
apiVersion
string
kind
string
metadata
object
annotations
object
key
additional properties
string
creationTimestamp
string
deletionGracePeriodSeconds
integer format: int64
deletionTimestamp
string
finalizers
Array<string>
nullable
generateName
string
generation
integer format: int64
labels
object
key
additional properties
string
managedFields
Array<object>
nullable
object
apiVersion
string
fieldsType
string
fieldsV1
object
key
additional properties
manager
string
operation
string
subresource
string
time
string
name
string
namespace
string
ownerReferences
Array<object>
nullable
object
apiVersion
required
string
blockOwnerDeletion
boolean
controller
boolean
kind
required
string
name
required
string
uid
required
string
resourceVersion
string
selfLink
string
uid
string
spec
required

FunctionSpec describes a Function. Every field is mutable: a change to code, image or resources rolls the workers, and in-flight calls finish on the old ones. maxCostUSD can only be raised.

object
args
Array<string>
nullable
cluster

FunctionCluster is spec.cluster (Beta).

object
launcher

Launcher is Plain for @nodus.clustered.

string
network

Network is the gang network placement.

string
size

Size is the number of nodes of the gang.

integer format: int32
transport

Transport is the gang transport.

string
code
required

FunctionCode locates the function the worker runs.

object
blob

Blob is the content-addressed code archive shared by the App’s members.

string
cls

FunctionClass describes an @app.cls class.

object
methods

Methods are the @nodus.method() names a call may name (at most 128).

Array<string>
nullable
name
required

Name is the class name.

string
module
required

Module is the importable module path.

string
qualname
required

Qualname is the qualified name of the function or class in the module.

string
command
Array<string>
nullable
connections
Array<string>
nullable
env
Array<object>
nullable

EnvVar is one environment variable: a literal value or a Secret key.

object
name
required

Name matches ^[A-Za-z_][A-Za-z0-9_]*$.

string
value

Value is the literal value.

string
valueFrom

EnvVarSource names where an env value comes from.

object
secretKeyRef

SecretKeySelector selects one key of a Secret.

object
key
required

Key is the key within it.

string
name
required

Name is the Secret.

string
image
string
imagePullSecrets
Array<string>
nullable
imageRef
string
initCommand

InitCommand is a preflight run before the command.

object
command
required

Command is the argv.

Array<string>
nullable
timeout

Timeout is at most 30m.

string
maxCostUSD

MaxCostUSD caps what the Function’s workers may spend in total. It can only be raised.

string
network

Network sets egress for the container.

object
egress

Egress is the outbound network policy.

object
allow

Allow lists DNS names or *.suffix patterns (AllowList only; at most 128).

Array<string>
nullable
policy

Policy is Deny, AllowList or Open.

string
presets

Presets add curated host lists such as python-packages or huggingface.

Array<string>
nullable
placement

Placement constrains where work may run.

object
dedicated

Dedicated is reserved; only true is accepted.

boolean
interruptible

Interruptible is Never, Allow (the scheduler decides by expected cost) or Prefer.

string
maxRateUSDPerHour

MaxRateUSDPerHour filters out offerings above this customer rate.

string
offerings

Offerings restricts placement to these Offerings.

Array<string>
nullable
pool

Pool is a BYOC Pool in the project.

string
profile

Profile is Balanced, Cost or Speed.

string
queueTimeout

QueueTimeout is how long the Job may wait for capacity before failing with CapacityUnavailable (default 24h; 0s waits forever).

string
regions

Regions are region classes (us, eu, …); empty means any.

Array<string>
nullable
python
required

Python is the interpreter minor version of the image, 3.10 to 3.13. A caller on another minor gets Invalid.

string
recovery

Recovery says how progress survives lost capacity.

object
checkpoint

CheckpointPolicy configures checkpoints.

object
format

Format is Snapshot, or Dcp for torch.distributed.checkpoint (the default for distributed Jobs).

string
integration

Integration is Auto, None or HFTrainer.

string
interval

Interval is auto or a duration from 1m to 6h.

string
maxSize

MaxSize is checked before upload (default 1Ti, at most 2Ti).

string
paths

Paths are saved together in one checkpoint (at most 64; default /nodus/state).

Array<string>
nullable
retainAfterFinish

RetainAfterFinish keeps checkpoints this long after the Job finishes (default 168h).

string
continuity

Continuity is Checkpointed (restore the latest checkpoint), Restartable (progress cursor) or Ephemeral.

string
maxAttempts

MaxAttempts is how many infrastructure replacements each index may use (1–32; gangs count restarts).

integer format: int32
minProgressDuration

MinProgressDuration is the run time that counts as progress (default 2m).

string
onInterruption

OnInterruption is Resume, or Fail to fail instead of recovering or suspending.

string
resources

Resources are capacity floors. For GPU work the offering’s host shape applies if larger.

object
cpu

CPU is the vCPU floor.

string
disk

Disk is the ephemeral disk floor.

string
gpu

GPURequest asks for accelerators. A family (H100) matches any of its variants and never another family.

object
count

Count is the GPUs per node: 1, 2, 4 or 8.

integer format: int32
exact

Exact pins the exact variant instead of matching the family.

boolean
interconnect

Interconnect is Any or NVLink.

string
minMemory

MinMemory is the per-GPU memory floor.

string
type

Type lists 1–8 accelerator ids or families from the catalog.

Array<string>
nullable
memory

Memory is the host memory floor.

string
nodes

Nodes above 1 is shorthand for spec.distributed.nodes and is stored in that form.

integer format: int32
retries

FunctionRetries is spec.retries.

object
backoffCoefficient

BackoffCoefficient multiplies the delay after each retry, 1 to 10 (default 2.0).

number format: double
initialDelay

InitialDelay is the wait before the first retry (default 1s).

string
maxDelay

MaxDelay caps the delay (default 60s).

string
maxRetries

MaxRetries is how many times a call that raised is retried, 0 to 10.

integer format: int32
scaling

FunctionScaling is spec.scaling.

object
maxWorkers

MaxWorkers bounds the pool, 1 to 1000 (default 10).

integer format: int32
minWorkers

MinWorkers stay warm even when idle, 0 to maxWorkers; an idle one is billed as warm capacity.

integer format: int32
scaledownWindow

ScaledownWindow is how long an idle worker above minWorkers stays, 0s to 20m (default 60s).

string
targetConcurrency

TargetConcurrency is the calls one worker runs at once, 1 to 1000 (default 1).

integer format: int32
secrets
Array<object>
nullable

SecretMount mounts one Secret, optionally pinned to a version. The bare name is accepted on write.

object
name
required

Name is the Secret.

string
version

Version pins a version; unset pins the latest at admission.

integer format: int32
serviceAccountName
string
sidecars
Array<object>
nullable

Sidecar is a helper container with native-sidecar semantics.

object
command
required

Command is the sidecar’s argv.

Array<string>
nullable
env

Env adds environment variables.

Array<object>
nullable

EnvVar is one environment variable: a literal value or a Secret key.

object
name
required

Name matches ^[A-Za-z_][A-Za-z0-9_]*$.

string
value

Value is the literal value.

string
valueFrom

EnvVarSource names where an env value comes from.

object
secretKeyRef

SecretKeySelector selects one key of a Secret.

object
key
required

Key is the key within it.

string
name
required

Name is the Secret.

string
image

Image defaults to the Job’s image.

string
name
required

Name is unique within the Job.

string
startupTimeout

StartupTimeout bounds how long the sidecar may take to become ready.

string
state

State is the desired state: Running (the default) or Stopped, which drains the workers to zero while new calls queue.

string
timeout

Timeout is the limit of one call, 1s to 24h (default 300s).

string
volumes
Array<object>
nullable

VolumeMount mounts a Volume.

object
mountPath
required

MountPath is the absolute mount point; system paths are refused.

string
readOnly

ReadOnly mounts it read-only.

boolean
revision

Revision pins a revision; only with readOnly.

integer format: int64
volume
required

Volume names the Volume.

string
workingDir
string
status

FunctionStatus is what Nodus observed about a Function.

object
appVersion

AppVersion is the App version that last deployed this Function.

integer format: int64
conditions

Conditions are Ready (WorkersReady) and Funded.

Array<object>
nullable
object
lastTransitionTime
required
string
message
required
string
observedGeneration
integer format: int64
reason
required
string
status
required
string
type
required
string
cost

Cost is status.cost on every kind that spends money. It is a display copy of the ledger: amounts are decimal USD strings, and nothing is charged from these fields.

object
bySegment

CostSegments splits a charge by billing segment.

object
bootUSD

BootUSD is the charge from the start of billing until the program started.

string
coveredByNodus

CoveredByNodus lists the segments (Boot, Running, Restore, Teardown) with time Nodus paid for instead of charging it, such as the start and teardown of a run that failed because of Nodus.

Array<string>
nullable
restoreUSD

RestoreUSD is the charge for bringing a replacement up after capacity was lost.

string
runningUSD

RunningUSD is the charge while the program ran.

string
teardownUSD

TeardownUSD is the charge from stop until deletion was confirmed, with the billing increment.

string
final

Final is true once the final charge has posted.

boolean
fundedUntilTime

FundedUntilTime is when the current holds stop paying for the object.

string
heldUSD

HeldUSD is what is currently held for it.

string
limitUSD

LimitUSD is the object’s maxCostUSD, if it has one.

string
rateUSDPerHour

RateUSDPerHour is the sum of the hourly rates of its capacity that is still billing.

string
totalUSD

TotalUSD is what has been charged for this object so far.

string
estimate

Estimate is returned in status.estimate by a dry-run (?dryRun=All) and on create for every compute kind (ADR-031). Amounts are decimal USD strings; the ETag of the dry-run response binds a later create to it.

object
assemblyBoundUSD

AssemblyBoundUSD is the most a multi-node Job can cost if its members never assemble.

string
blockingReasons

BlockingReasons say why a real create would fail now, with the amounts and a fix.

Array<object>
nullable

BlockingReason says why a create would fail now.

object
code
required

Code is the error code the create would return, for example InsufficientCredits.

string
fix

Fix says what to do.

string
message

Message states the reason with the amounts involved.

string
concurrentHoldUSD

ConcurrentHoldUSD is the total of the holds for every slot that starts at once.

string
costUSD

USDBand is a median and a 90th-percentile amount in USD.

object
p50

P50 is the median amount.

string
p90

P90 is the 90th-percentile amount.

string
gangHoldUSD

GangHoldUSD is the total of the member holds of a multi-node Job.

string
holdUSD

HoldUSD is the first hold that must fit your balance, every matching Budget and the object’s own cap.

string
minimumChargeUSD

MinimumChargeUSD is the billing increment rounding charged once per allocation.

string
overheadUSD

USDBand is a median and a 90th-percentile amount in USD.

object
p50

P50 is the median amount.

string
p90

P90 is the 90th-percentile amount.

string
placementPreview

PlacementPreview is the customer-safe description of the capacity a create would use.

object
explain

Explain is the scheduler’s explanation, the same shape as Attempt status.placement.explain.

interruptible

Interruptible reports whether the capacity can be reclaimed.

boolean
offering

Offering is the offering id, for example h100-sxm-80g-x8-us.

string
regionClass

RegionClass is the region class of the offering.

string
warmReuse

WarmReuse reports whether warm capacity would be reused.

boolean
pricebookVersion

PricebookVersion is the price book the estimate used.

string
rateUSDPerHour

RateUSDPerHour is the hourly rate of the chosen capacity.

string
startup

StartupEstimate is the expected time to start.

object
cold

DurationBand is a median and a 90th-percentile duration, as Go duration strings.

object
p50

P50 is the median duration.

string
p90

P90 is the 90th-percentile duration.

string
warm

DurationBand is a median and a 90th-percentile duration, as Go duration strings.

object
p50

P50 is the median duration.

string
p90

P90 is the 90th-percentile duration.

string
topology

Topology is the resolved multi-node topology of a gang Job.

validUntil

ValidUntil is when the prices this estimate used stop being current. A create bound by If-Match is admitted after it too, and never placed above rateUSDPerHour plus 10 %.

string
warnings

Warnings are non-blocking notes, for example ColdStart or InterruptibleSelected.

Array<object>
nullable

EstimateWarning is a non-blocking note on an estimate.

object
code
required

Code is the CamelCase warning code.

string
message

Message explains the warning.

string
handledRequests

HandledRequests records the restart requests the controller acted on.

object
key
additional properties
string
image

ImageStatus is the pinned image.

object
digest

Digest is the pinned digest.

string
reference

Reference is the image as written.

string
user

User is the user the image’s config runs its process as (root when it names none). Only an image that runs as root is placed on offerings that start the Nodus node agent inside the image itself.

string
message

Message explains the phase in a sentence.

string
observedGeneration

ObservedGeneration is the spec generation this status reflects.

integer format: int64
phase

Phase is the lifecycle phase, from the long-running vocabulary.

string
queue

FunctionQueue is status.queue.

object
queued
required

Queued calls wait for a worker.

integer format: int32
running
required

Running calls are on a worker.

integer format: int32
reason

Reason is the machine-readable reason for the phase.

string
workers

FunctionWorkers is status.workers.

object
busy
required

Busy workers run at least one call.

integer format: int32
draining

Draining workers finish their calls and stop.

integer format: int32
idle
required

Idle workers run none.

integer format: int32
ready
required

Ready workers are claiming calls.

integer format: int32
starting
required

Starting workers are placed but not claiming yet.

integer format: int32
Example generated
{
"apiVersion": "example",
"kind": "example",
"metadata": {
"annotations": {
"additionalProperty": "example"
},
"creationTimestamp": "example",
"deletionGracePeriodSeconds": 1,
"deletionTimestamp": "example",
"finalizers": [
"example"
],
"generateName": "example",
"generation": 1,
"labels": {
"additionalProperty": "example"
},
"managedFields": [
{
"apiVersion": "example",
"fieldsType": "example",
"fieldsV1": {
"additionalProperty": "example"
},
"manager": "example",
"operation": "example",
"subresource": "example",
"time": "example"
}
],
"name": "example",
"namespace": "example",
"ownerReferences": [
{
"apiVersion": "example",
"blockOwnerDeletion": true,
"controller": true,
"kind": "example",
"name": "example",
"uid": "example"
}
],
"resourceVersion": "example",
"selfLink": "example",
"uid": "example"
},
"spec": {
"args": [
"example"
],
"cluster": {
"launcher": "example",
"network": "example",
"size": 1,
"transport": "example"
},
"code": {
"blob": "example",
"cls": {
"methods": [
"example"
],
"name": "example"
},
"module": "example",
"qualname": "example"
},
"command": [
"example"
],
"connections": [
"example"
],
"env": [
{
"name": "example",
"value": "example",
"valueFrom": {
"secretKeyRef": {
"key": "example",
"name": "example"
}
}
}
],
"image": "example",
"imagePullSecrets": [
"example"
],
"imageRef": "example",
"initCommand": {
"command": [
"example"
],
"timeout": "example"
},
"maxCostUSD": "example",
"network": {
"egress": {
"allow": [
"example"
],
"policy": "example",
"presets": [
"example"
]
}
},
"placement": {
"dedicated": true,
"interruptible": "example",
"maxRateUSDPerHour": "example",
"offerings": [
"example"
],
"pool": "example",
"profile": "example",
"queueTimeout": "example",
"regions": [
"example"
]
},
"python": "example",
"recovery": {
"checkpoint": {
"format": "example",
"integration": "example",
"interval": "example",
"maxSize": "example",
"paths": [
"example"
],
"retainAfterFinish": "example"
},
"continuity": "example",
"maxAttempts": 1,
"minProgressDuration": "example",
"onInterruption": "example"
},
"resources": {
"cpu": "example",
"disk": "example",
"gpu": {
"count": 1,
"exact": true,
"interconnect": "example",
"minMemory": "example",
"type": [
"example"
]
},
"memory": "example",
"nodes": 1
},
"retries": {
"backoffCoefficient": 1,
"initialDelay": "example",
"maxDelay": "example",
"maxRetries": 1
},
"scaling": {
"maxWorkers": 1,
"minWorkers": 1,
"scaledownWindow": "example",
"targetConcurrency": 1
},
"secrets": [
{
"name": "example",
"version": 1
}
],
"serviceAccountName": "example",
"sidecars": [
{
"command": [
"example"
],
"env": [
{
"name": "example",
"value": "example",
"valueFrom": {
"secretKeyRef": {
"key": "example",
"name": "example"
}
}
}
],
"image": "example",
"name": "example",
"startupTimeout": "example"
}
],
"state": "example",
"timeout": "example",
"volumes": [
{
"mountPath": "example",
"readOnly": true,
"revision": 1,
"volume": "example"
}
],
"workingDir": "example"
},
"status": {
"appVersion": 1,
"conditions": [
{
"lastTransitionTime": "example",
"message": "example",
"observedGeneration": 1,
"reason": "example",
"status": "example",
"type": "example"
}
],
"cost": {
"bySegment": {
"bootUSD": "example",
"coveredByNodus": [
"example"
],
"restoreUSD": "example",
"runningUSD": "example",
"teardownUSD": "example"
},
"final": true,
"fundedUntilTime": "example",
"heldUSD": "example",
"limitUSD": "example",
"rateUSDPerHour": "example",
"totalUSD": "example"
},
"estimate": {
"assemblyBoundUSD": "example",
"blockingReasons": [
{
"code": "example",
"fix": "example",
"message": "example"
}
],
"concurrentHoldUSD": "example",
"costUSD": {
"p50": "example",
"p90": "example"
},
"gangHoldUSD": "example",
"holdUSD": "example",
"minimumChargeUSD": "example",
"overheadUSD": {
"p50": "example",
"p90": "example"
},
"placementPreview": {
"explain": "example",
"interruptible": true,
"offering": "example",
"regionClass": "example",
"warmReuse": true
},
"pricebookVersion": "example",
"rateUSDPerHour": "example",
"startup": {
"cold": {
"p50": "example",
"p90": "example"
},
"warm": {
"p50": "example",
"p90": "example"
}
},
"topology": "example",
"validUntil": "example",
"warnings": [
{
"code": "example",
"message": "example"
}
]
},
"handledRequests": {
"additionalProperty": "example"
},
"image": {
"digest": "example",
"reference": "example",
"user": "example"
},
"message": "example",
"observedGeneration": 1,
"phase": "example",
"queue": {
"queued": 1,
"running": 1
},
"reason": "example",
"workers": {
"busy": 1,
"draining": 1,
"idle": 1,
"ready": 1,
"starting": 1
}
}
}

An error: a metav1.Status whose reason is a registered code.

Media type application/json

Status is the error body of every API response: a Kubernetes metav1.Status (so kubectl and client-go understand it) plus three top-level extensions that those clients ignore (ADR-028).

object
apiVersion
string
code
integer format: int32
details
object
causes
Array<object>
nullable
object
field
string
message
string
reason
string
group
string
kind
string
name
string
retryAfterSeconds
integer format: int32
uid
string
docs

Docs is the URL of the code’s docs page.

string
fix

Fix says what to do next, for example a CLI command or the field to change.

string
kind
string
message
string
metadata
object
continue
string
remainingItemCount
integer format: int64
resourceVersion
string
selfLink
string
shardInfo
object
selector
required
string
reason
string
requestId

RequestID identifies the request in logs and support tickets.

string
status
string
Example generated
{
"apiVersion": "example",
"code": 1,
"details": {
"causes": [
{
"field": "example",
"message": "example",
"reason": "example"
}
],
"group": "example",
"kind": "example",
"name": "example",
"retryAfterSeconds": 1,
"uid": "example"
},
"docs": "example",
"fix": "example",
"kind": "example",
"message": "example",
"metadata": {
"continue": "example",
"remainingItemCount": 1,
"resourceVersion": "example",
"selfLink": "example",
"shardInfo": {
"selector": "example"
}
},
"reason": "example",
"requestId": "example",
"status": "example"
}