OpenAI API Tester
Build, run and copy OpenAI Chat Completions API requests as cURL, Python and JavaScript.
Request aur cURL, Python aur JavaScript code banana locally aapke browser mein hota hai. Jab aap Run dabate hain, aapki OpenAI API key aur prompt seedhe aapke browser se OpenAI ko bheje jaate hain — ArrayKit ko nahi. Aapki key sirf browser memory mein rakhi jaati hai aur kabhi store ya ArrayKit ko nahi bheji jaati. Shared ya public machines par production keys use karne se bachein.
Claude API test karein
OpenAI API Tester ke baare mein
OpenAI API Tester aapko browser chhode bina OpenAI Chat Completions requests banane, run karne aur copy karne deta hai. Apni OpenAI API key paste karein, gpt-4o ya gpt-4o-mini jaisa model chunein, max tokens set karein, aur prompt likhein — tool https://api.openai.com/v1/chat/completions par ek valid POST assemble karta hai aur ready-to-use cURL, Python aur JavaScript snippets generate karta hai. Jahan CORS allow karta hai, Run dabakar request seedhe aapke browser se OpenAI ko bhej sakte hain aur raw JSON response inspect kar sakte hain. Yeh un developers ke liye bana hai jo check kar rahe hain ki nayi key kaam karti hai, prompt prototype kar rahe hain, 401 ya rate-limit error debug kar rahe hain, ya ek tested request seedhe apne app mein copy kar rahe hain. Request aur code locally browser mein construct hote hain; aapki key sirf tab OpenAI ko call karne ke liye use hoti hai jab aap use run karna choose karte hain.
Features
- https://api.openai.com/v1/chat/completions par messages aur max_tokens ke saath ek valid POST banata hai
- gpt-4o, gpt-4o-mini, gpt-4-turbo, o1-mini aur gpt-3.5-turbo ke liye model suggestions
- Jahan CORS allow karta hai wahan requests seedhe browser se run karein aur raw JSON response dekhein
- Usi request ke liye copy-ready cURL, Python aur JavaScript generate karta hai
- Adjustable max tokens aur kisi bhi Chat Completions model ke liye editable model field
- Aapki paste ki gayi key se Authorization: Bearer header apne aap set ho jata hai
- API key field ke liye show/hide toggle taaki yeh screen par chhupa rahe
- cURL, Python aur JavaScript tabs ke beech switch karein aur ek click mein copy karein
OpenAI API Tester kaise use karein
- Apni OpenAI API key (sk-…) key field mein paste karein
- gpt-4o-mini jaisa model chunein ya type karein aur max tokens set karein
- Prompt box mein apna prompt likhein
- Request bhejne aur JSON response padhne ke liye Run dabayein
- cURL, Python ya JavaScript tab kholein aur code copy karein
Common errors aur troubleshooting
- Browser mein Run CORS / network error ke saath fail ho jata hai — OpenAI cross-origin browser calls block kar sakta hai; generated cURL ya Python copy karein aur use terminal ya apne backend se run karein.
- 401 Incorrect API key provided — Check karein ki key active hai aur poori copy hui hai (sk- se shuru), aur yeh sahi OpenAI organization ya project ki hai.
- 429 rate limit ya insufficient_quota — Aap rate limit par pohonch gaye hain ya koi credit nahi bacha; wait karke retry karein, ya OpenAI dashboard mein billing add karein.
- 404 model not found — Model name galat hai ya aapke account ke paas access nahi hai; ek aisa model use karein jise aap call kar sakte hain, jaise gpt-4o-mini.
- Response beech sentence mein cut ho jata hai — Max tokens value badhayein taaki completion ko poora hone ki jagah mile.
Aksar pooche jaane wale sawaal
- OpenAI API Tester kya hai?
- Yeh ek ArrayKit tool hai jo aapki key, model aur prompt se ek OpenAI Chat Completions request banata hai, jahan CORS allow karta hai wahan use run karne deta hai, aur usi call ke liye copy-ready cURL, Python aur JavaScript deta hai.
- Kya meri OpenAI API key yahan paste karna safe hai?
- Request aur code locally aapke browser mein bante hain. Jab aap Run dabate hain, aapki key aur prompt seedhe aapke browser se OpenAI ko bheje jaate hain, kabhi ArrayKit ko nahi, aur key sirf browser memory mein rakhi jaati hai — ise store ya ArrayKit ko nahi bheja jaata. Shared machines par production keys use karne se bachein.
- cURL kaam karne ke baad bhi Run kabhi-kabhi kyun fail hota hai?
- Browsers CORS enforce karte hain, isliye request valid hone par bhi seedhi browser call block ho sakti hai. Generated cURL ya Python copy karein aur use terminal ya backend se run karein.
- Main kaunse models test kar sakta hoon?
- Koi bhi Chat Completions model jisko aapka account access kar sakta hai. Tool gpt-4o, gpt-4o-mini, gpt-4-turbo, o1-mini aur gpt-3.5-turbo suggest karta hai, aur aap koi bhi doosra model name type kar sakte hain.
- Kya mujhe sirf cURL ke bajaye Python aur JavaScript code bhi mil sakta hai?
- Haan. Apni pasand ki language mein bilkul wahi request copy karne ke liye cURL, Python aur JavaScript tabs ke beech switch karein.
- Kya tool mere prompts ya responses store karta hai?
- Nahi. Prompt request banane aur run karne ke liye use hota hai; ArrayKit aapke prompts, keys ya responses kisi server par store nahi karta.
Related tools
- Anthropic Claude API Tester — Build, run and copy Anthropic Claude Messages API requests as cURL, Python and JavaScript.
- Google Gemini API Tester — Build, run and copy Google Gemini generateContent API requests as cURL, Python and JavaScript.
- Replicate API Tester — Build, run and copy Replicate prediction API requests as cURL, Python and JavaScript.
- Hugging Face API Tester — Build, run and copy Hugging Face Inference API requests as cURL, Python and JavaScript.
- API Client — HTTP requests bhejein, headers aur params banayein aur responses inspect karein; aapki aakhri 25 save hoti hain.
- cURL se Fetch — Ek curl command ko JavaScript fetch() call mein convert karein.
- Basic Auth Generator — Generate and decode HTTP Basic Auth Authorization headers from a username and password.
- URL Parser — Ek URL ko uske parts mein todein aur query parameters list karein.
Saare ArrayKit tools