Functions
Ephemeral function runtime — Python, TypeScript or Go. Cold-start <60 s for CPU; warm pool for GPU.
What it is
Functions package a handler + dependencies into an immutable artifact and run it on a managed ephemeral runtime. Useful for event-driven work, HTTP back-ends, or anything that doesn't justify a long-running pod.
When to use it
- HTTP back-end behind /v1/edge/functions or a custom route.
- Event-driven processing from queues or webhooks.
- Per-request work where you don't want to pay for idle pods.
Quickstart
asc fn create hello --runtime python3.12 --handler handler.main --code . --memory 512Mi --timeout 30s
asc fn invoke hello --payload '{}'fn = client.functions.create(name='hello', runtime='python3.12', handler='handler.main', code_path='.')
client.functions.invoke(fn.id, payload={})const fn = await client.functions.create({ name: 'hello', runtime: 'python3.12', handler: 'handler.main', codePath: '.' });Limits & quotas
| Limit | Default | Burst | Notes |
|---|---|---|---|
| Cold-start (CPU) | <60 s | — | From new artifact |
| Warm reuse | Yes | — | Identical artifact, same project |
| Max payload | 6 MiB sync / 256 KiB stream | — | |
| Memory | 128 MiB – 10 GiB | — | |
| Timeout | 30 s default | 15 min |
Pricing
See pricing. Pay-as-you-go, billed monthly via Stripe.
API surface
POST /v1/functionsPOST /v1/functions/{id}/invokeGET /v1/functions/{id}/logs
Required scope(s): functions:read, functions:write. See Scopes.
Security
All access is authenticated and scoped. See Auth & scopes and Network controls.