API documentation
Free public API, no login required. Generates code against 126,529 real API signatures from 805 libraries. Rate limits and request format documented here.
Endpoint
POST https://sdkagent.dev/api/generate
Content-Type: application/json
Request
{
"question": "Write an httpx request with exponential backoff",
"lang": "auto",
"model": "poolside/laguna-s-2.1:free",
"history": []
}
| Field | Required | Description |
|---|---|---|
question | Yes | Your question. Up to 4,000 characters. |
lang | No | auto (default) detects the language from the question.
Can be set explicitly to python and others. |
model | No | Model to use. Defaults to a code-specialised model. |
history | No | Conversation history as an array of
{"role","content"} (last 6 entries). |
Response
{
"answer": "generated code and explanation",
"context": "the real APIs passed to the model",
"api_count": 14,
"langs": ["python"],
"auto_detected": true,
"quota": { "used": 3, "limit": 20, "remaining": 17 }
}
Rate limits
The API is free and requires no login, but the following limits apply to keep the service running.
| Window | Limit |
|---|---|
| Per day | 20 requests |
| Per 60 seconds | 5 requests |
| Question length | 4,000 characters |
Exceeding a limit returns 429. Remaining quota is reported
in the quota field and the
X-RateLimit-Remaining header.
Example
curl -X POST https://sdkagent.dev/api/generate \
-H "Content-Type: application/json" \
-d '{"question":"group and aggregate a DataFrame with pandas"}'
Errors
| Code | Meaning |
|---|---|
| 400 | Malformed request |
| 429 | Rate limit exceeded |
| 502 | Upstream model error |
| 503 | Knowledge base or configuration unavailable |
Terms of use
This API is provided free of charge with no guarantee of availability, latency or output accuracy. It may change or be discontinued without notice. Commercial use is permitted, but verifying generated code is your responsibility. See the terms of service.