Back to Home

API Reference

Integrate Mindetry's AI capabilities directly into your applications with our REST API.

Authentication

All API requests require authentication using a Bearer token. You can generate an API key in your dashboard.

Authorization: Bearer YOUR_API_KEY

Endpoints

POST
/v1/completions
Generate code completions
curl -X POST https://api.mindetry.dev/v1/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "function fibonacci(n)",
    "language": "typescript",
    "max_tokens": 500
  }'
POST
/v1/chat
Chat with Mindetry AI
curl -X POST https://api.mindetry.dev/v1/chat \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      {"role": "user", "content": "How do I implement a binary search?"}
    ]
  }'
POST
/v1/review
Get code review suggestions
curl -X POST https://api.mindetry.dev/v1/review \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "function add(a, b) { return a + b }",
    "language": "javascript"
  }'
GET
/v1/usage
Get your API usage statistics
curl https://api.mindetry.dev/v1/usage \
  -H "Authorization: Bearer YOUR_API_KEY"

Rate Limits

PlanRequests/minRequests/day
Starter10100
Pro60Unlimited
EnterpriseCustomUnlimited