Test your API integration, right in the browser.
This iteration wires up a live API request tester. Your API key location is clearly marked in the page source: open the code, find the block labeled INSERT YOUR API KEY HERE, and paste your key. You can also paste a key below for a session-only test without editing the file.
Request Tester demo mode
Sends a POST request to your endpoint with a Bearer token. If no key is set, a built-in demo response shows the full round trip so every control still works.
Idle. Fill in a key or run in demo mode.
No response yet. Press Send request to begin.Where the key goes in source
View this page's source and search for the banner below. That is the exact spot.
/* =============================================
INSERT YOUR API KEY HERE
Replace the empty string with your key:
API_KEY: "YOUR_API_KEY_HERE"
============================================= */Copyable integration snippet
Drop this into any page. The key slot is marked the same way.
const CONFIG = {
// INSERT YOUR API KEY HERE
API_KEY: "YOUR_API_KEY_HERE",
ENDPOINT: "https://api.example.com/v1/chat"
};
async function callApi(prompt){
const r = await fetch(CONFIG.ENDPOINT,{
method:"POST",
headers:{
"Content-Type":"application/json",
"Authorization":"Bearer "+CONFIG.API_KEY
},
body:JSON.stringify({prompt})
});
if(!r.ok) throw new Error("HTTP "+r.status);
return r.json();
}How this works
Three steps to a live integration.
1. Add your key
Open the source of this page, find the block labeled INSERT YOUR API KEY HERE inside the CONFIG object, and paste your key between the quotes. Or paste it in the field above for a one-off session test.
2. Point at your endpoint
Change the Endpoint URL to your API's request URL. The console sends a JSON POST with your prompt and an Authorization Bearer header.
3. Read the response
Status, latency, and the full JSON body render below the tester. Errors are shown in plain language with a Retry button, and demo mode keeps the interface fully usable without a key.