AI API Request Builder

Build AI API request payloads and cURL commands for any provider.

JSON Request Body
{
  "model": "gpt-4o",
  "messages": [
    {
      "role": "system",
      "content": "You are a helpful assistant."
    },
    {
      "role": "user",
      "content": "Hello!"
    }
  ],
  "temperature": 0.7,
  "max_tokens": 1024
}
cURL Command
curl -X POST 'https://api.openai.com/v1/chat/completions' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer $OPENAI_API_KEY' \
  -d '{
  "model": "gpt-4o",
  "messages": [
    {
      "role": "system",
      "content": "You are a helpful assistant."
    },
    {
      "role": "user",
      "content": "Hello!"
    }
  ],
  "temperature": 0.7,
  "max_tokens": 1024
}'
Endpointhttps://api.openai.com/v1/chat/completions

Related Tools

Learn More

FAQ

Which AI APIs are supported?
OpenAI Chat Completions, Anthropic Messages (Claude), Google Gemini, and Ollama (LLaMA) are all supported.
How do I use the generated cURL command?
Copy the cURL command and paste it into your terminal. Replace the placeholder API key variables ($OPENAI_API_KEY, etc.) with your actual keys.
Is my data sent anywhere?
No. All request building happens in your browser. No data is sent to any server.

Generate ready-to-use JSON request bodies and cURL commands for OpenAI, Claude, Gemini, and LLaMA APIs. Select a model, set temperature and max tokens, compose your messages, and copy the formatted request or cURL command.