API
API reference
Use the same bearer token from signup/login. Base URL: https://api.rcode.ai (or your self-hosted API URL).
POST /v1/chat
Send messages with optional code context.
curl -X POST https://api.rcode.ai/v1/chat \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{ "role": "user", "content": "Add confidence bands to this ggplot" }
],
"codeContext": "library(ggplot2)\nggplot(mtcars, aes(wt, mpg)) + geom_point()",
"mode": "general"
}'GET /v1/me
Returns profile, plan, and daily usage.
{
"email": "you@lab.edu",
"name": null,
"plan": "free",
"used": 12,
"limit": 30,
"billingConfigured": true
}GET /v1/me/export
Download profile and saved conversations as JSON.
Rate limits
Free accounts: 30 messages/day. Pro and Team: unlimited daily messages. Auth and contact endpoints are rate-limited per IP. HTTP 429 when exceeded.