Most API request bugs are easier to fix before the request is sent. Start with valid JSON, then check model-family parameters and only then debug application code.
Workflow
- Paste the request body into a JSON validator and fix syntax errors first.
- Check that the model field exists and matches the endpoint you plan to call.
- Review max_tokens versus max_completion_tokens for the selected model family.
- Inspect response_format and tools arrays for shape issues before sending.
- Build a minimal cURL request with placeholders and compare it with your SDK call.
Checks before production
- Do not paste production API keys into browser tools or shared screenshots.
- Reasoning models may support a different parameter set than general text models.
- Validate JSON separately from API-specific warnings.
- Always confirm final compatibility against official OpenAI API documentation.
FAQ
Should I debug SDK code first?
Usually no. First prove the JSON body and parameters are valid with a minimal request.
Does local validation guarantee API success?
No. It catches common mistakes, but the API and account settings remain the source of truth.
Related tools
OpenAI
OpenAI API Request Checker
Statically inspect an OpenAI API request body for common JSON and parameter mistakes before sending it to the API.
Open tool JSON JSON Validator and FormatterValidate JSON, format it for reading, or minify it for compact API payloads without sending data to an external API.
Open tool cURL cURL Command BuilderBuild readable cURL commands for API requests with method, headers, JSON body and safe auth placeholders.
Open toolLast updated: May 18, 2026