API Reference
Integrate ExplainThisCode into your applications with our comprehensive REST API. Get programmatic access to code explanations, analysis, and more.
Getting Started
To use the ExplainThisCode API, you'll need an access key. You can generate one from your dashboard. All requests require authentication via an X-API-Key header (or Authorization: Bearer ...). New to the platform? Begin by installing the SDK.
What Can You Build?
The API is flexible enough for many different use cases. Here are a few ideas to get you started:
- CI/CD integration — Add automatic code explanations to every pull request. Your team gets a plain-English summary of each change right inside the review.
- IDE plugins — Build editor extensions that explain highlighted code on demand. Great for onboarding new team members or exploring unfamiliar libraries.
- Code review tools — Pipe diffs through the API to surface complexity hot-spots, potential bugs, and security concerns before a reviewer even opens the file.
- Educational platforms — Power interactive coding courses with instant, skill-level-aware explanations. Students learn faster when they can ask “what does this do?” at any time.
Each endpoint accepts a code snippet, a target language, and an optional analysis mode. Responses include a structured explanation, complexity metrics, and suggested improvements. Check the Endpoints page for full parameter details.
Authentication
Learn how to authenticate your requests using access keys
Endpoints
Explore all available service endpoints and their parameters
Rate Limits
Understand rate limiting and usage quotas
API usage is included with paid plans. See pricing for request limits and quota details. New to REST APIs? Our guide on what a REST API is and how it works covers the fundamentals.
Base URL
All API requests should be made to:
https://explainthiscode.ai/apiQuick Example
curl -X POST https://explainthiscode.ai/api/explain \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"code": "function hello() { return \"world\"; }",
"language": "javascript",
"mode": "standard"
}'