FREE TOOL · NO SIGN-UP

cURL to Python, JavaScript and Node.js

Paste a cURL command copied from API docs or browser dev tools and get the same request as ready-to-run code.

RUNS IN YOUR BROWSERNOTHING UPLOADEDNO WATERMARK
import requests

headers = {
    "Authorization": "Bearer $SANDBASE_API_KEY",
}

payload = {
    "model": "anthropic/claude-sonnet-5.5",
    "messages": [
        {
            "role": "user",
            "content": "Hello",
        },
    ],
}

response = requests.request("POST", "https://api.sandbase.ai/v1/chat/completions", headers=headers, json=payload)
print(response.status_code)
print(response.text)

How to use it

Step 1
Paste a cURL command. Line breaks with a trailing backslash are fine.
Step 2
Pick Python, JavaScript fetch or Node.js.
Step 3
Copy the code.

Frequently asked questions

Which cURL options are supported?
The URL, -X/--request, -H/--header, -d/--data, --data-raw, --data-binary, --json, -u/--user, -G/--get, -F/--form text fields and --compressed. Other flags are ignored and listed under the code.
Does it send the request?
No. It only rewrites the command. Nothing is sent and nothing leaves your browser.
Can I convert SandBase API calls?
Yes. Every model and API page on SandBase has a cURL example you can paste here.

Build with it on SandBase

Models and APIs on one key, when the job outgrows a browser tool.

More free tools

All free tools →