← Status

Winkle Run API

Run code in 40+ languages over HTTP. Judge0-compatible: point any Judge0 client at https://run.usewinkle.com and use your Winkle Run key.

Authentication

Every request carries your API key, in either header:

X-Auth-Token: wr_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Authorization: Bearer wr_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Keep the key on your server. It is shown once, when it is created; if you lose it, ask for a new one.

1. Pick a language

curl -s https://run.usewinkle.com/languages -H "X-Auth-Token: $WINKLE_RUN_KEY"

Free. Returns [{"id": 71, "name": "Python (3.8.1)"}, ...].

2. Submit code

curl -s -X POST "https://run.usewinkle.com/submissions?base64_encoded=false" \
  -H "X-Auth-Token: $WINKLE_RUN_KEY" -H "Content-Type: application/json" \
  -d '{"language_id": 71, "source_code": "print(input()[::-1])", "stdin": "hello"}'

{"token": "d85cd024-1548-4165-96c7-7bc88673f194"}

Optional fields: stdin, expected_output, cpu_time_limit (seconds), memory_limit (KB), compiler_options, command_line_arguments. Limits above your plan's caps are lowered to the cap. callback_url and enable_network are ignored, and wait=true is not supported: submit, then poll.

3. Poll for the result

curl -s "https://run.usewinkle.com/submissions/d85cd024-1548-4165-96c7-7bc88673f194?base64_encoded=false" \
  -H "X-Auth-Token: $WINKLE_RUN_KEY"

{"stdout": "olleh\n", "status": {"id": 3, "description": "Accepted"}, "time": "0.012", "memory": 3200, ...}

Poll every 0.5 to 1 second until status.id is 3 or more. 1 is In Queue, 2 is Processing, 3 is Accepted, 4 Wrong Answer, 5 Time Limit Exceeded, 6 Compilation Error, 7 to 12 Runtime Error, 13 Internal Error, 14 Exec Format Error. Add &fields=stdout,status to get less back.

Batches

curl -s -X POST "https://run.usewinkle.com/submissions/batch?base64_encoded=false" \
  -H "X-Auth-Token: $WINKLE_RUN_KEY" -H "Content-Type: application/json" \
  -d '{"submissions": [{"language_id": 71, "source_code": "print(1)"}, {"language_id": 71, "source_code": "print(2)"}]}'

curl -s "https://run.usewinkle.com/submissions/batch?tokens=TOKEN1,TOKEN2&base64_encoded=false" \
  -H "X-Auth-Token: $WINKLE_RUN_KEY"

Up to 20 submissions per batch. Results come back in the order you asked; a token that is not yours comes back as null.

Pricing

One credit per submission; a batch of n costs n. You are not charged when a submission is rejected (for example an unknown language) or when the runner fails with status 13. Reading results and the language list is free.

Pricing per run is announced soon. Talk to us for early access.

Errors

HTTPerrorWhat to do
400bad_request, batch_too_large, wait_not_supportedFix the request.
401unauthorizedMissing, malformed or revoked key.
402insufficient_creditsOut of credits. The response includes balance. Top up and retry.
403customer_suspendedThe account is suspended. Contact us.
404not_foundNo such submission, or it belongs to another account.
413payload_too_largeRequests are capped at 512 KB.
422(Judge0's own message)Judge0 rejected a field, e.g. an unknown language_id. Not charged.
429rate_limitedWait retry_after seconds (also in the Retry-After header).
502upstream_unavailableThe runner did not answer. Not charged. Retry with backoff.

Every error body is JSON: {"error": "...", "message": "..."}.

Status

Live status at https://run.usewinkle.com/, machine-readable at /status.json, and /health for uptime monitors.