Execute Python via REST

A lightweight, secure, and blazing-fast API to run Python code snippets in the cloud.

Quick Start

Integrate Python execution into your apps with a single POST request. Perfect for online judges, educational tools, or automation.

1

Endpoint

POST https://python-api-self.vercel.app/run/python

2

JSON Payload

Pass your source code as a string in the "code" field.

terminal — curl
curl -X POST https://python-api-self.vercel.app/run/python \
-H "Content-Type: application/json" \
-d '{"code":"print(\"Hello world!\")"}'

{
  "exit_code": 0,
  "status": "SUCCESS",
  "stderr": "",
  "stdout": "Hello world!\n"
}

Interactive Playground

Test the API directly from your browser.

Run the code to see output...