API Reference
Integrate NileAI into your apps. The API proxy is built into this installation — no separate server needed.
Base URL
https://fundravest.com/api.php
Send all API requests to this endpoint. No API key header required — the endpoint is open.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| messages | array | ✓ | Array of {role, content} objects. Roles: user or assistant |
| messages[].role | string | ✓ | user for human messages, assistant for prior AI replies |
| messages[].content | string | ✓ | The message text |
Code Example
php
$ch = curl_init("https://fundravest.com/api.php");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
"messages" => [
["role" => "user", "content" => "Hello NileAI!"]
]
])
]);
$data = json_decode(curl_exec($ch), true);
echo $data["content"];