Code Review API
Automatically review code for bugs, security vulnerabilities, and performance issues using Claude AI via REST API. Submit any code snippet or function and receive structured findings with severity ratings and suggested fixes.
Try it live →How it works
POST a code string and optional language hint. The API sends it to Claude with a code-review system prompt that identifies bugs (logic errors, null pointer risks), security issues (injection, hardcoded secrets, insecure defaults), performance problems, and style issues.
Use cases
- Integrate AI code review into CI/CD pipelines as a quality gate
- Review code submitted by contractors or new team members automatically
- Audit legacy codebases for security vulnerabilities in bulk
- Build code quality dashboards that score PRs before human review
API Reference
POST https://slopshop.gg/v1/llm-code-review
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Input parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text |
string | required | The text to process with AI |
options |
object | optional | Optional configuration (format, length, etc.) |
Example response
{
"data": {
"result": "AI-generated result based on your input.",
"model": "claude-3-5-sonnet",
"tokens_used": 150
},
"meta": {
"credits_used": 10,
"engine": "real",
"ms": 4
}
}
Examples
Three real-world scenarios showing how developers use Code Review in production.
curl -X POST https://slopshop.gg/v1/llm-code-review \
-H "Authorization: Bearer $SLOPSHOP_KEY" \
-H "Content-Type: application/json" \
-d '{"code": "function login(user, pass) {\n const row = db.query(`SELECT * FROM users WHERE email='${user}'`);\n if (row.password === pass) return generateToken(row);\n}", "language": "javascript"}'
curl -X POST https://slopshop.gg/v1/llm-code-review \
-H "Authorization: Bearer $SLOPSHOP_KEY" \
-H "Content-Type: application/json" \
-d '{"code": "def calculate_discount(price, coupon):\n if coupon == 'SAVE10':\n return price * 0.9\n if coupon == 'HALF':\n return price / 2\n return price", "language": "python"}'
curl -X POST https://slopshop.gg/v1/llm-code-review \
-H "Authorization: Bearer $SLOPSHOP_KEY" \
-H "Content-Type: application/json" \
-d '{"code": "rm -rf ./dist && npm run build && cp -r ./dist /var/www/html && echo Done", "language": "bash"}'
Code examples
curl
curl -X POST https://slopshop.gg/v1/llm-code-review \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input": "your data here"}'
Python
import requests
response = requests.post(
"https://slopshop.gg/v1/llm-code-review",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"input": "your data here"}
)
result = response.json()
print(result["data"])
Node.js
const response = await fetch("https://slopshop.gg/v1/llm-code-review", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({ input: "your data here" })
});
const { data } = await response.json();
console.log(data);
CLI
# Install the Slopshop CLI
npm install -g slopshop
# Set your API key
export SLOPSHOP_KEY=your_api_key
# Call llm-code-review
slop llm-code-review '{"input": "your data here"}'
Pricing
Credits are purchased in bundles starting at $1 for 1,000 credits. All compute APIs like this one use 10 credits per call — that's $0.01. See all pricing tiers.
Related APIs in AI: Code
View the full API catalog · Try in playground · Documentation