Total API Keys
0
Active Keys
0
Total Credits
0
characters (sent + received)
Total Requests
0

Recent Activity

No activity yet

Name API Key Prompt Timeout Credits Status Actions
No API keys yet. Create one to get started.

No logs yet

Getting Started

AI-ANDY provides a simple REST API that connects to Claude AI. Each API key has a custom system prompt that gets prepended to every request.

Base URL:

Authentication

Include your API key in the request using one of these methods:

Method 1: X-API-Key Header (Recommended)

X-API-Key: andy-your-api-key-here

Method 2: Authorization Header

Authorization: Bearer andy-your-api-key-here

Method 3: Request Body

{ "api_key": "andy-your-api-key-here", "message": "your message" }

Chat Endpoint

POST /api/chat

Send a message to Claude AI with your configured prompt.

Request

curl -X POST /api/chat \ -H "Content-Type: application/json" \ -H "X-API-Key: andy-your-api-key-here" \ -d '{"message": "Hello"}'

Response (Success)

{ "success": true, "result": "Claude's response here...", "usage": { "chars_sent": 150, "chars_received": 200, "credits_used": 350, "duration_ms": 3500 } }

Response (Error)

{ "success": false, "error": "Error description" }

How Prompts Work

Each API key has an associated prompt template. When you send a message, the system combines the prompt with your message:

Prompt: "Translate to Vietnamese with professional tone: " Message: "Hello, how are you?" Full prompt sent to Claude: "Translate to Vietnamese with professional tone: Hello, how are you?"

Integration Examples

Python

import requests response = requests.post( "/api/chat", headers={"X-API-Key": "your-api-key"}, json={"message": "Hello"} ) data = response.json() print(data["result"])

JavaScript (Node.js)

const response = await fetch("/api/chat", { method: "POST", headers: { "Content-Type": "application/json", "X-API-Key": "your-api-key" }, body: JSON.stringify({ message: "Hello" }) }); const data = await response.json(); console.log(data.result);

PHP

$ch = curl_init("/api/chat"); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Content-Type: application/json", "X-API-Key: your-api-key" ]); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([ "message" => "Hello" ])); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = json_decode(curl_exec($ch)); echo $response->result;

Health Check

GET /api/health

curl /api/health

Change Password

Server Information

Service: AI-ANDY v1.0
Status: Online
API Base URL: