piapia123
en

LLM curl Builder

Web

Everything runs locally in your browser — nothing is uploaded

Input
Drop a file here to load its contents
Output

Everyone hand-writes a curl call to a model once, and the two backends differ in every detail: the path (/api/chat against /v1/chat/completions), where the sampling parameters live (Ollama nests them under options, OpenAI puts them at the top level), whether an Authorization header is needed, how JSON mode is spelled, and what the response looks like. When one of those is wrong the error is usually unhelpful: a 400, or a blob of JSON that explains nothing. So the two backends are one dropdown here, the output is a complete command and request body ready to paste into a terminal, and the differences get a block of their own so switching backends is a matter of editing the fields that moved. ⚠️ This tool only builds the command; it never sends a request and never reads your environment. $OPENAI_API_KEY is handed to your shell to expand. That distinction matters, because a request builder is easily mistaken for a request sender, and this site has no backend and never calls anything on your behalf.

Features

  • Both APIs in one place: Ollama native (/api/chat) and OpenAI-compatible (/v1/chat/completions)
  • ⚠️ The differences are listed side by side, the most common mistake being where the sampling parameters live
  • The curl command pastes straight into a terminal, with the body single-quoted and inner quotes broken correctly
  • The request body comes as its own block, ready to adapt to another language
  • The system prompt is optional; leaving it out does not insert an empty message
  • JSON mode is spelled differently on each backend and generated accordingly
  • A temperature outside 0-2 fails before generation instead of producing a command that will 400
  • ⚠️ The key is written as a variable reference such as $OPENAI_API_KEY; the tool reads no environment and touches no real key
  • Everything runs in your browser and produces text only

How to use

  1. Write the prompt you want to send
  2. Pick the API: a local Ollama or an OpenAI-compatible service
  3. Optionally set the endpoint, model and system prompt; sensible defaults are used otherwise
  4. Copy the whole curl command and run it in your terminal

FAQ

Does it send the request for me?
No. This is a static site with no backend at all, so the output is text: the command, the request body, and a comparison of how the two APIs differ. It makes no network requests, does not read your environment and has no idea what your key is. To actually call the model, paste the command into your own terminal.
Why does the Ollama command carry no key?
Because Ollama listens on localhost (127.0.0.1:11434) and does not authenticate by default, so a local call needs no key. ⚠️ That is also its sharp edge: expose Ollama to the internet without putting an authenticating reverse proxy in front and anyone can run models on your machine, consuming your GPU and memory. That is considerably worse than leaking an API key. For remote use, put an authenticated proxy in front.
I set temperature at the top level and nothing changed. Why?
Because Ollama takes its sampling parameters inside an options object (options.temperature, options.num_predict), while the OpenAI-compatible API takes them at the top level. Putting them at the top level for Ollama is not an error: unknown fields are quietly ignored, which shows up as parameters that appear to do nothing. This tool places them correctly for the selected backend and lists those spots in the differences block.
Can it generate Python or JavaScript instead?
Only curl for now, and the reason is that curl is the common denominator: it runs anywhere it is installed, survives a paste into documentation, a ticket or a README, and it lays out every part of the HTTP request in the open. Porting it to another language is a matter of copying those parts. The body is a separate JSON block, which drops straight into requests.post(url, json=body) or fetch(url, {body}).

Related tools