Skip to main content

    API Reference

    Complete reference for the GenerateAI.dev API. Build powerful integrations with our RESTful endpoints.

    Base URL

    https://api.generateai.dev/v1

    Authentication

    Secure API access with JWT tokens

    POST/auth/login

    User authentication

    POST/auth/refresh

    Refresh access token

    POST/auth/logout

    Invalidate session

    AI Chat

    Interactive AI conversation endpoints

    POST/api/chat

    Send message to AI

    GET/api/chat/history

    Get chat history

    DELETE/api/chat/clear

    Clear chat history

    Prompts

    Manage and execute prompts

    GET/api/prompts

    List all prompts

    POST/api/prompts

    Create new prompt

    PUT/api/prompts/:id

    Update prompt

    DELETE/api/prompts/:id

    Delete prompt

    RAG Operations

    Retrieval-Augmented Generation endpoints

    POST/api/rag/upload

    Upload documents

    POST/api/rag/query

    Query knowledge base

    GET/api/rag/documents

    List documents

    DELETE/api/rag/documents/:id

    Delete 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"
      }'