Welcome to Evoka
  • # Introduction
  • Getting Started
    • What is Evoka AI?
    • Getting Started
      • Step 1
      • Step2
      • Step 3
      • Step 4
      • Step 5
    • Features
    • AI Agents
    • Tech Stack
    • Frequently Asked Questions (FAQ)
    • Api Documentation
Powered by GitBook
On this page
  • API Documentation
  • Base URL
  • Authentication
  • Endpoints
  • Error Handling
  1. Getting Started

Api Documentation

API Documentation

Evoka AI provides a set of RESTful APIs to interact with its powerful backend services. Use these APIs to integrate Evoka AI’s capabilities into your workflows and applications.


Base URL

All API endpoints are accessible via the following base URL:

http://localhost:3001/api

Authentication

  • No authentication is required for development purposes.

  • Ensure your environment variables, including OPENAI_API_KEY, are properly configured.


Endpoints

1. Chat Endpoint

Description

Generates AI-powered responses based on the provided prompt and context.

Endpoint

POST /chat

Request Body

{
  "prompt": "string",
  "previousMessages": [
    {
      "role": "user" | "assistant",
      "content": "string"
    }
  ],
  "siteStructure": "array"
}

Response

{
  "response": "string",
  "changes": "array"
}

Example

curl -X POST http://localhost:3001/api/chat \
-H "Content-Type: application/json" \
-d '{
  "prompt": "Build a homepage using React",
  "previousMessages": [],
  "siteStructure": []
}'

2. Game Development Chat

Description

Creates or updates game files based on user input.

Endpoint

POST /gamedevchat

Request Body

{
  "prompt": "string",
  "previousMessages": [
    {
      "role": "user" | "assistant",
      "content": "string"
    }
  ],
  "gameStructure": "string"
}

Response

{
  "response": "string",
  "changes": "array"
}

3. Host Site

Description

Hosts a website with the provided pages and metadata.

Endpoint

POST /host

Request Body

{
  "pages": "array",
  "metadata": {
    "name": "string",
    "description": "string",
    "topics": "array",
    "messageCount": "integer"
  }
}

Response

{
  "siteId": "string",
  "url": "string"
}

4. Fetch Recent Sites

Description

Retrieves a list of recently created sites.

Endpoint

GET /recentsites

Response

[
  {
    "siteId": "string",
    "name": "string",
    "createdAt": "string"
  }
]

5. Fetch Site by ID

Description

Fetches a specific site using its unique ID.

Endpoint

GET /sites/:siteId

Response

{
  "siteId": "string",
  "name": "string",
  "pages": "array",
  "metadata": "object"
}

Error Handling

All endpoints return errors in the following format:

{
  "error": "string",
  "details": "string"
}

PreviousFrequently Asked Questions (FAQ)

Last updated 5 months ago

For detailed integration examples and advanced use cases, explore our complete documentation or reach out via .

GitHub Issues