Strata AI Documentation
  • Welcome to the future
  • Getting Started
    • Quickstart
    • Installation
    • LLM API
    • Tools Configuration
  • High Level Guides
    • Inter-Agent Communication
    • Development
    • Serialization & Breakpoint Recovery
    • Implementation Logic
    • RAG Module
    • Environment
    • Integrations
  • API Documentation
    • Initial Documentation
Powered by GitBook
On this page
  • Overview
  • Endpoints
  • Error Codes
  • Authentication
  • Rate Limits
  1. API Documentation

Initial Documentation

This feature will be enabled and updated in Q1 2025

Welcome to the Strata AI API Documentation, designed to help you understand and integrate the core features and capabilities of Strata AI into your applications.

Overview

Strata AI offers a comprehensive framework to streamline AI-based workflows by optimizing prompt handling across multiple Large Language Models (LLMs). Its modular and extensible design allows developers to create sophisticated solutions that leverage the power of multiple LLMs efficiently.

Endpoints

Strata AI provides a set of APIs to interact with the system. Below are the details of the primary endpoints:

1. Initialize Configuration

Endpoint:

POST /api/v1/config/init

Description:

Generates a configuration file for Strata AI to initialize environment and tool settings.

Parameters:

Parameter

Type

Description

Required

path

string

The file path to store the configuration.

Yes

Example Request:

{
  "path": "~/.strata/config.yaml"
}

Example Response:

{
  "message": "Configuration file initialized at ~/.strata/config.yaml."
}

2. Execute Prompt

Endpoint:

POST /api/v1/prompt/execute

Description:

Processes a user prompt by selecting the best LLM for the task and returning the optimized response.

Parameters:

Parameter

Type

Description

Required

prompt

string

The user-provided prompt to process.

Yes

context

object

Additional context or metadata for the prompt.

No

model_hint

string

Suggests a specific LLM model to use (optional).

No

Example Request:

{
  "prompt": "What is the capital of France?",
  "context": {
    "user": "test_user",
    "session_id": "12345"
  },
  "model_hint": "gpt-4-turbo"
}

Example Response:

{
  "response": "The capital of France is Paris.",
  "model_used": "gpt-4-turbo",
  "latency": "1.24s"
}

3. Retrieve Logs

Endpoint:

GET /api/v1/logs

Description:

Fetches execution logs for debugging and monitoring purposes.

Parameters:

Parameter

Type

Description

Required

session_id

string

Filter logs by a specific session ID.

No

limit

int

The maximum number of log entries to retrieve.

No

Example Request:

GET /api/v1/logs?session_id=12345&limit=10

Example Response:

[
  {
    "timestamp": "2024-12-20T10:15:30Z",
    "session_id": "12345",
    "log_level": "INFO",
    "message": "Prompt executed successfully."
  },
  {
    "timestamp": "2024-12-20T10:15:31Z",
    "session_id": "12345",
    "log_level": "DEBUG",
    "message": "Selected model: gpt-4-turbo."
  }
]

4. Configure Tools

Endpoint:

POST /api/v1/tools/configure

Description:

Configures external tools such as web searching APIs or text-to-speech engines.

Parameters:

Parameter

Type

Description

Required

tool_name

string

The name of the tool to configure.

Yes

configuration

object

Key-value pairs for tool settings.

Yes

Example Request:

{
  "tool_name": "web_search",
  "configuration": {
    "api_type": "google",
    "api_key": "YOUR_API_KEY",
    "cse_id": "YOUR_CSE_ID"
  }
}

Example Response:

{
  "message": "Web search tool configured successfully."
}

5. Monitor System Status

Endpoint:

GET /api/v1/status

Description:

Retrieves the current status of the system, including API health and active LLMs.

Parameters:

None

Example Request:

GET /api/v1/status

Example Response:

{
  "system_status": "operational",
  "active_llms": ["gpt-4-turbo", "claude-2"],
  "uptime": "48 hours"
}

Error Codes

Code

Message

Description

200

OK

Request was successful.

400

Bad Request

Invalid parameters were provided.

401

Unauthorized

API key is missing or invalid.

404

Not Found

Resource not found.

500

Internal Server Error

An unexpected error occurred.


Authentication

Strata AI uses API keys for authentication. Include your API key in the Authorization header of each request:

Authorization: Bearer YOUR_API_KEY

To obtain your API key, contact the Strata AI support team or follow the onboarding process.


Rate Limits

Default rate limits:

  • Standard Plan: 250 requests per minute

  • Enterprise Plan: 1000 requests per minute

Contact support for custom rate limits.

For additional support contact us at support@strata.ai.

PreviousIntegrations

Last updated 4 months ago