Skip to main content
POST
code.program.run

Authorizations

Authorization
string
header
required

API key: sk_live_…

Headers

Idempotency-Key
string
required

Required: this capability has an external effect.

Maximum string length: 255
Pramaan-Max-Price-Micro
string

Optional. The most this request may be priced at, in micro-USD (a whole number above 0). It replaces the capability's own price ceiling for this request, lower or higher. Sources that could cost more are left out; when none is left the answer is 400 with the lowest limit that would work.

Pattern: ^[1-9]\d{0,14}$

Body

application/json
language
string
required

Language key, or multi-file for an archive with root compile/run scripts.

Required string length: 1 - 64
code
string

Single-file source, at most 65,536 UTF-8 bytes; send this or archiveFileId.

Minimum string length: 1
archiveFileId
string

Id of an uploaded file holding ZIP program archive, up to 10 MiB compressed and 20 MiB expanded, 200 files, in place of a public link.

Pattern: ^file_[0-9A-HJKMNP-TV-Z]{26}$
additionalArchiveFileId
string

Id of an uploaded file holding extra ZIP files for a single-file program, in place of a public link.

Pattern: ^file_[0-9A-HJKMNP-TV-Z]{26}$
compilerOptions
string

Compiler options, at most 512 UTF-8 bytes.

arguments
string

Program argument string, at most 512 UTF-8 bytes.

stdin
string

Standard input, at most 65,536 UTF-8 bytes.

expectedOutput
string

Expected standard output for native comparison.

runCount
integer
default:1

Repeat count; values above one require an explicitly enabled metering tier.

Required range: 1 <= x <= 20
cpuTimeSeconds
number
default:5

CPU time limit in seconds.

Required range: 0.1 <= x <= 20
wallTimeSeconds
number
default:10

Wall-clock time limit in seconds.

Required range: 1 <= x <= 20
extraCpuSeconds
number
default:0

Additional CPU time allowed after a limit is exceeded.

Required range: 0 <= x <= 5
memoryLimitMb
integer
default:128

Memory limit in decimal MB, converted to kilobytes.

Required range: 64 <= x <= 512
stackLimitMb
integer
default:64

Stack limit in decimal MB.

Required range: 1 <= x <= 512
maxFileSizeMb
integer
default:1

Maximum output file size in decimal MB.

Required range: 1 <= x <= 20
maxProcesses
integer
default:60

Maximum processes and threads.

Required range: 1 <= x <= 60
perProcessTime
boolean
default:false

Apply CPU limits per process and thread.

perProcessMemory
boolean
default:false

Apply memory limits per process and thread.

mergeStderr
boolean
default:false

Explicitly merge standard error into standard output.

Response

Job started; poll GET /v1/jobs/{id}

job_id
string
required
status
enum<string>
required
Available options:
running
held_micro
integer
required

The credit set aside for the job (its estimate), micro-USD; 0 when it takes none. Not a price: what the job is charged reads on GET /v1/jobs/{id} once it is settled.