Complete API documentation for integrating Astra AI into your applications
All API requests must include your API key in the Authorization header:
/api/auth/googleAuthenticate with Google OAuth
user object with token
/api/auth/usernameAuthenticate with username/password
user object with token
/api/auth/logoutLogout current user
success message
/api/ai/generateGenerate code from natural language
generated code and files
/api/ai/enhanceEnhance prompt for better results
enhanced prompt
/api/ai/chatChat with AI for code refinement
AI response
/api/workspaceGet all user workspaces
array of workspace objects
/api/workspace/createCreate new workspace
workspace object
/api/workspace/:idUpdate workspace
updated workspace
/api/workspace/:idDelete workspace
success message
/api/files/:workspaceIdGet all files in workspace
array of file objects
/api/files/uploadUpload file to workspace
file object
/api/files/:fileIdDelete file
success message
npm install @astra-ai/sdk
pip install astra-ai
Direct HTTP requests