API Reference
Complete reference for the GenerateAI.dev API. Build powerful integrations with our RESTful endpoints.
Base URL
https://api.generateai.dev/v1Authentication
Secure API access with JWT tokens
POST
/auth/loginUser authentication
POST
/auth/refreshRefresh access token
POST
/auth/logoutInvalidate session
AI Chat
Interactive AI conversation endpoints
POST
/api/chatSend message to AI
GET
/api/chat/historyGet chat history
DELETE
/api/chat/clearClear chat history
Prompts
Manage and execute prompts
GET
/api/promptsList all prompts
POST
/api/promptsCreate new prompt
PUT
/api/prompts/:idUpdate prompt
DELETE
/api/prompts/:idDelete prompt
RAG Operations
Retrieval-Augmented Generation endpoints
POST
/api/rag/uploadUpload documents
POST
/api/rag/queryQuery knowledge base
GET
/api/rag/documentsList documents
DELETE
/api/rag/documents/:idDelete document
Authentication Example
curl -X POST https://api.generateai.dev/v1/api/chat \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"message": "Hello, AI assistant!",
"context": "general"
}'