POST
/
v1
/
repo
/
{repo_id}
/
ask
curl -X POST https://api.relace.ai/v1/repo/123e4567-e89b-12d3-a456-426614174000/ask \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "How does the user authentication system work?"
  }'
{
  "answer": "The user authentication system uses JWT tokens with a login endpoint at /api/auth/login. Users provide credentials which are validated against the database using bcrypt for password hashing. Successful logins receive a signed JWT token that expires after 24 hours. The system also includes middleware to verify tokens on protected routes and handles refresh tokens for extended sessions."
}

Path Parameters

repo_id
string
required
Repo ID

Request Body

query
string
required
Natural language question about the repo

Response

answer
string
Natural language answer generated by the AI based on repo content
curl -X POST https://api.relace.ai/v1/repo/123e4567-e89b-12d3-a456-426614174000/ask \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "How does the user authentication system work?"
  }'
{
  "answer": "The user authentication system uses JWT tokens with a login endpoint at /api/auth/login. Users provide credentials which are validated against the database using bcrypt for password hashing. Successful logins receive a signed JWT token that expires after 24 hours. The system also includes middleware to verify tokens on protected routes and handles refresh tokens for extended sessions."
}