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
FREE
Developer toolsJSON Formatter & Validator
Format, minify and validate JSON, with the line and column of the first syntax error.
Open tool →FREE
Developer toolsJSON to CSV Converter
Turn a JSON array into a CSV file or spreadsheet, with nested fields flattened into columns.
Open tool →FREE
Developer toolsBase64 Encoder & Decoder
Encode text or files to Base64 and decode Base64 back to text, with UTF-8 and URL-safe options.
Open tool →