Skip to main content
POST
/
snippets:execute
Execute ad-hoc snippet code
curl --request POST \
  --url https://api.akua.dev/v1/snippets:execute \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "code": "<string>"
}
'
{
  "stats": {
    "cpu_time_ms": 123,
    "wall_time_ms": 123,
    "heap_used_bytes": 123
  },
  "result": "<unknown>",
  "error": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.akua.dev/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

workspace API token (sk_akua_...) or OAuth2 JWT. Create tokens at https://akua.dev/developers/api-tokens

Headers

akua-context
string

Optional workspace/scope context for the request. Carries a single workspace wire id (ws_…) today. Only needed for broad tokens — a workspace-owned token implies its workspace.

Required string length: 1 - 53
Example:

"ws_j572abc123def456"

Body

application/json
code
string
required

Async JavaScript function body. Executed in a sandboxed V8 isolate with access to platform.request().

Required string length: 1 - 50000

Response

Snippet execution result

stats
object
required
result
any
error
string