Prompt to cURL
Paste a prompt; get a complete cURL command for OpenAI / Anthropic / Gemini / DeepSeek. Useful for one-off API testing from the terminal or for copy-paste into provider documentation.
How to use the Prompt to cURL
Pick provider, set model, paste prompts. Output uses environment variables for API keys ($OPENAI_API_KEY, $ANTHROPIC_API_KEY, etc.) — set the var in your shell first, then paste the command.
Testing a prompt from the terminal
When you just want to fire a prompt at an API to see what comes back, a cURL command is the quickest path — no project, no SDK install, just one line in the terminal. But each provider has its own endpoint, headers, and request body shape, so writing that command from memory is easy to get wrong.
This tool builds a complete, correct cURL command for OpenAI, Anthropic, Gemini, or DeepSeek from your model and prompt. The API key is referenced as an environment variable rather than pasted inline, so you can copy the command without baking a secret into your shell history. For a runnable script instead, see the Python and JavaScript generators.
Common use cases
- One-off testing — hit an API from the terminal without writing any code.
- Endpoint reference — get the correct URL, headers, and body for a provider.
- Debugging — reproduce a request outside your app to isolate an issue.
- Docs and bug reports — paste a runnable cURL example others can try.
- Cross-provider checks — compare the same prompt against several APIs quickly.
Frequently asked questions
Which providers are supported?
Is my API key put in the command?
$OPENAI_API_KEY, so set that in your shell first and the key never appears in the copied text.