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."
}
Ask natural language questions about 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."
}
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."
}