Installation Guide
You can use ExplainThis in several ways. Pick the method that fits your workflow best.
System Requirements
The web interface needs only a modern browser. To call the REST API from your own code you need any HTTP client (curl, fetch, Python requests) and an API key.
Web Interface
The web interface requires no installation. Simply visit ExplainThis.ai to get started.
VS Code extension
Search for “ExplainThisCode” in the Extensions panel, or install it from the command line:
Command line
code --install-extension explainthiscode.explainthiscodeREST API
There is no SDK package to install. The REST API works from any language with a plain HTTP request.
Configuration
Set up your API key. We suggest using environment variables so credentials stay out of version control:
Environment Variables
# .env file
EXPLAINTHIS_API_KEY=your_api_key_hereVerifying your setup
Run the short snippet below to confirm your API key works. If it returns an explanation, you're ready to go.
TypeScript Example
const code = `
function quickSort(arr) {
if (arr.length <= 1) return arr;
const pivot = arr[0];
const left = arr.slice(1).filter(x => x < pivot);
const right = arr.slice(1).filter(x => x >= pivot);
return [...quickSort(left), pivot, ...quickSort(right)];
}
`;
const response = await fetch('https://explainthiscode.ai/api/explain', {
method: 'POST',
headers: {
'X-API-Key': process.env.EXPLAINTHIS_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({ code, mode: 'standard', language: 'javascript' }),
});
console.log(await response.json());Next Steps
- Set up API authentication - Get your API key
- Explore basic examples - Learn through examples
- API endpoints - View all available endpoints
- Changelog - Check the latest updates, new features, and bug fixes