Error Handling
Error Handling
The API uses standard HTTP status codes to indicate the success or failure of requests. Below are the common error responses:
400 Bad Request: The request could not be understood or was missing required parameters.
401 Unauthorized: Authentication failed or user does not have permissions for the desired action.
404 Not Found: The requested resource does not exist.
429 Too Many Requests: Rate limit exceeded.
500 Internal Server Error: An unexpected error occurred on the server.
Error Response Format:
{
"detail": "Error message describing what went wrong."
}Models
1. CreateUserRequest
CreateUserRequestDescription: Request body schema for creating a new user.
Fields:
username:string(3-50 characters, alphanumeric, required)password:string(min 8 characters, at least one digit and one uppercase letter, required)
2. AssignAPIKeyRequest
AssignAPIKeyRequestDescription: Request body schema for assigning an API key to a user.
Fields:
username:string(3-50 characters, alphanumeric, required)
3. APIKeyResponse
APIKeyResponseDescription: Response schema for API key operations.
Fields:
message:stringapi_key:string
4. RemoveUserRequest
RemoveUserRequestDescription: Request body schema for removing a user.
Fields:
username:string(required)
5. FileUploadResponse
FileUploadResponseDescription: Response schema for PDF upload.
Fields:
message:stringfile_id:stringgcs_url:string(optional)
6. ProcessResponse
ProcessResponseDescription: Response schema for retrieving processing results.
Fields:
result:objectorstringchunks:arrayofobject
Last updated