Prompt Template Builder
Fill a prompt template from spreadsheet rows and get one prompt per row.
Build a chat API request for OpenAI, Claude, Gemini, Groq or Ollama in cURL, Python, JS or PHP.
The OpenAI API Request Builder writes working chat API calls for OpenAI, Anthropic Claude, Gemini, Mistral, Groq, DeepSeek, OpenRouter, Ollama and any OpenAI-compatible server, in cURL, Python, JavaScript or PHP, with provider differences handled.
The first working API call is often the slowest one: which endpoint, which header carries the key, whether the limit is max_tokens or max_completion_tokens, where the system prompt goes, and why a perfectly reasonable temperature returns an error. This builder writes a correct request for you.
Choose a provider — OpenAI, Anthropic, Google Gemini through its OpenAI-compatible endpoint, Mistral, Groq, DeepSeek, OpenRouter, a local Ollama server or any OpenAI-compatible endpoint — and a language: cURL, Python with requests, JavaScript with fetch, or PHP with cURL. Set the model, system prompt, user message, output limit, temperature, streaming and JSON mode, and the code updates as you type.
Provider differences are handled rather than left for you to discover: the Anthropic request uses x-api-key, anthropic-version and a top-level system field and reads only the text blocks of the response; sampling settings are left out for models that reject them; and JSON mode warns when the messages never mention JSON. Keys are always read from environment variables, never written into the code.
OpenAI, Anthropic, Gemini, Mistral, Groq, DeepSeek, OpenRouter, Ollama and custom endpoints.
cURL, Python with requests, JavaScript with fetch and PHP with cURL.
Anthropic headers and system field, max_completion_tokens for OpenAI, text-only response parsing.
Temperature is left out for models that reject it, with the reason shown.
Every snippet reads the API key from an environment variable.
The endpoint and a sensible default model fill in. Both stay editable.
cURL for the terminal, Python, JavaScript for Node, or PHP.
A system prompt and a user message, plus the output limit and options.
Export the named environment variable with your API key, then run the code.
Send a POST request to https://api.openai.com/v1/chat/completions with an Authorization: Bearer header containing your key and a JSON body with the model and a messages array. The cURL tab writes the full command.
The Anthropic Messages API uses an x-api-key header and an anthropic-version header, requires max_tokens, and takes the system prompt as a top-level field instead of a system message.
Several current reasoning models, including OpenAI GPT-5 and o-series models and the newest Claude models, reject sampling parameters. The builder leaves temperature out for those models and says why.
Yes. Both expose an OpenAI-compatible chat completions endpoint locally. Choose Ollama, or the OpenAI-compatible option with your own URL.
No. It only writes code. Nothing is sent to any API, and you never type your key into the page.
What people who use the OpenAI API Request Builder think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the OpenAI API Request Builder. It takes half a minute and no account.
Write the first reviewFill a prompt template from spreadsheet rows and get one prompt per row.
See the file size of every GGUF quant of a model, and which ones fit your memory.
Split long documents into overlapping chunks for embeddings and RAG.
Build a structured system prompt for a chatbot, assistant or custom GPT.
Generate robots.txt rules to block GPTBot, ClaudeBot, CCBot and other AI crawlers.
Work out how much GPU memory a local LLM needs to run or fine-tune.
Turn question and answer pairs into a JSONL training file for OpenAI, Llama or Gemini.
Split a dataset into training, validation and test files with a repeatable shuffle.