Repo tokens provide scoped read/write access to specific repositories. They can be used in place of your Relace API key for repo-specific operations.
Repo tokens are strongly recommended for use in sandboxed environments to prevent unintended access to other resources associated with your Relace account.
Once created, repo tokens can be used as bearer tokens for authentication on any /repo/{repo_id} endpoint that they are scoped for:
Example Usage
Copy
Ask AI
# Use the repo token to search within an authorized repocurl -X POST https://api.relace.run/v1/repo/123e4567-e89b-12d3-a456-426614174000/search \ -H "Authorization: Bearer rlcr-a1b2c3d4e5f67890abcdef1234567890abcdef12" \ -H "Content-Type: application/json" \ -d '{ "query": "authentication logic" }'