Overview
CVAT API supports multiple authentication methods:- Token Authentication - API tokens for programmatic access
- Access Token Authentication - Personal access tokens with expiration
- Session Authentication - Browser session cookies
- Basic Authentication - Username and password (not recommended for production)
Token Authentication
Token authentication is the recommended method for API access.Using Tokens
Include your token in theAuthorization header:
Access Tokens
Access tokens provide more control with features like expiration dates and read-only access.Create an Access Token
Request Body
string
required
Token name for identification
string
Token expiration date in ISO 8601 format
boolean
default:false
Whether the token is read-only
Response
integer
Token ID
string
Token name
string
The access token (only returned on creation)
string
Token creation timestamp
string
Token expiration timestamp
boolean
Whether the token is read-only
string
Last usage timestamp
List Access Tokens
Query Parameters
string
Filter by token name
integer
Page number for pagination
integer
Number of results per page
string
Sort field (name, id, created_date, updated_date, expiry_date)
Get Token Details
Get Current Token Details
Get details about the token used for the current request:Update a Token
Revoke a Token
Login
Obtain an authentication token by logging in with credentials:Request Body
string
required
Username or email address
string
required
User password
Response
string
Authentication token
Logout
Invalidate the current authentication token:Register
Create a new user account:Password Management
Change Password
Change the password for the authenticated user:Reset Password
Request a password reset email:Confirm Password Reset
Reset password using the token from the reset email:Session Authentication
When using the CVAT web interface, sessions are managed automatically through cookies. This method includes CSRF protection:sessionidcookie for authenticationcsrftokencookie for CSRF protectionX-CSRFTokenheader with CSRF token value
Basic Authentication
Basic authentication uses base64-encoded credentials:Security Best Practices
- Use Access Tokens - Create dedicated tokens for different applications
- Set Expiration Dates - Tokens should expire periodically
- Use Read-Only Tokens - When write access isn’t needed
- Revoke Unused Tokens - Remove tokens that are no longer needed
- Keep Tokens Secret - Never commit tokens to version control
- Use HTTPS - Always make API requests over HTTPS