Back to Home

ODAM Documentation

API Reference & Guides

API Reference

Complete API documentation with examples and use cases

Base URL

Production
https://api.odam.dev
Development
http://localhost:8080

Authentication

ODAM uses API keys for authentication. Include your API key in the request headers:

Request Header
Authorization: Bearer your-api-key-here

Endpoints

POST/api/v1/chat

Send a chat message and receive AI response with memory

GET/api/v1/memory/{user_id}

Retrieve user memory and entities

DELETE/api/v1/memory/{user_id}

Clear user memory

GET/api/v1/health

Check system health and status

Chat Endpoint

Send a message to the AI and receive a personalized response with memory integration.

Request

POST /api/v1/chat
{
  "message": "Hi! I'm Alex, a developer from Kyiv.",
  "user_id": "alex_kyiv",
  "session_id": "intro_session",
  "context": {
    "temperature": 0.7,
    "max_tokens": 1000
  }
}

Response

200 OK
{
  "response": "Hi Alex! Nice to meet a developer from Kyiv!",
  "personalization_level": 75,
  "memory_utilization": 100,
  "entities_extracted": 3,
  "memories_found": 0,
  "confidence": 94.2,
  "processing_time": 7.1,
  "fallback_used": false,
  "session_id": "intro_session",
  "metadata": {
    "entities": [
      {
        "name": "Alex",
        "type": "Person",
        "confidence": 98,
        "attributes": ["name"]
      },
      {
        "name": "developer",
        "type": "Profession", 
        "confidence": 96,
        "attributes": ["occupation"]
      },
      {
        "name": "Kyiv",
        "type": "Location",
        "confidence": 97,
        "attributes": ["city", "residence"]
      }
    ],
    "memory_operations": {
      "entities_stored": 3,
      "relationships_created": 2,
      "memory_updated": true
    }
  }
}

Parameters

ParameterTypeRequiredDescription
messagestringYesThe user's message to the AI
user_idstringYesUnique identifier for the user
session_idstringNoSession identifier for grouping conversations
contextobjectNoAdditional context and parameters

Python SDK

Use our Python SDK for easier integration:

Installation

pip
pip install odam-sdk

Usage

Python
from odam import ODAMClient

# Initialize client
client = ODAMClient(api_key="your-api-key")

# Send message
response = client.chat(
    message="Hi! I'm Alex, a developer from Kyiv.",
    user_id="alex_kyiv"
)

print(f"Response: {response.message}")
print(f"Personalization: {response.personalization_level}%")

# Get user memory
memory = client.get_memory("alex_kyiv")
print(f"Entities: {len(memory.entities)}")

# Clear memory
client.clear_memory("alex_kyiv")

Error Handling

ODAM API uses conventional HTTP response codes to indicate success or failure:

200OK

Request successful

400Bad Request

Invalid request parameters

401Unauthorized

Invalid or missing API key

500Internal Server Error

Server error, please try again

Rate Limits

API requests are rate limited based on your subscription plan:

PlanRequests/MinuteRequests/Day
Free101,000
Starter6010,000
Pro600100,000
EnterpriseCustomCustom

Next Steps