Elvion AI Developer API
Intelligence Unleashed for builders. Integrate Elvion's research-grade chat models and image generation into your apps with a simple, credit-based REST API.
Introduction
Elvion AI gives you programmatic access to powerful AI models: Seraphina for deep analysis, Bobby for creativity, and image models for visual generation. This page is your one-stop, scrollable reference.
All endpoints share a common base URL:
Seraphina – The non-chalant guru
A research-focused model for deep analysis, complex reasoning, and factual synthesis. Ideal for assistants, dashboards, and knowledge-heavy apps.
Bobby – Creative dev ally
Friendly, code-savvy, and imaginative. Use Bobby for coding help, writing, and engaging conversations.
Image generation
Turn text into visuals. Choose from multiple styles like photoreal, anime_core, dreamcore, and more.
Quick Start
Make your first request to Seraphina in under a minute.
1. Get your API key
Log into the
Developer Portal,
create a project, and copy your key (for example: elv_sec_...).
2. First call to Seraphina
curl -X POST "https://web-production-9a18.up.railway.app/api/developer/seraphina/chat" \
-H "Authorization: Bearer YOUR_ELVION_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message": "Explain quantum computing in simple terms.",
"stream": false
}'
import requests
import json
API_URL = "https://web-production-9a18.up.railway.app/api/developer/seraphina/chat"
API_KEY = "YOUR_ELVION_API_KEY"
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}
payload = {
"message": "Explain quantum computing in simple terms.",
"stream": False
}
response = requests.post(API_URL, headers=headers, json=payload)
print(json.dumps(response.json(), indent=2))
const API_URL = "https://web-production-9a18.up.railway.app/api/developer/seraphina/chat";
const API_KEY = "YOUR_ELVION_API_KEY";
const payload = {
message: "Explain quantum computing in simple terms.",
stream: false
};
const callSeraphina = async () => {
const res = await fetch(API_URL, {
method: "POST",
headers: {
"Authorization": `Bearer ${API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify(payload)
});
const data = await res.json();
console.log(JSON.stringify(data, null, 2));
};
3. Example response
{
"response": "Quantum computing uses quantum bits, or qubits, which can represent multiple states at once...",
"model": "seraphina",
"credits_used": 5,
"timestamp": "2026-01-09T22:37:00Z",
"usage": {
"prompt_tokens": 24,
"completion_tokens": 220,
"total_tokens": 244
}
}
Authentication
All protected endpoints require an Elvion API key via Bearer authentication.
Include your key in the Authorization header for every request:
Authorization: Bearer YOUR_ELVION_API_KEY
Keys look like elv_sec_xxxxxxxxx. Treat them like passwords:
- Store API keys in environment variables, not in your Git repository.
- Use different keys for dev, staging, and production projects.
- Rotate keys if you suspect exposure.
Pricing & Credits
Simple, credit-based billing. Each request consumes credits depending on the endpoint.
Credit price
- Minimum top-up: $1.00
- 1$ = 1,000 credits
- Credits do not expire
- Pay-as-you-go usage
Endpoint costs
- Seraphina Chat – 5 credits / request
- Bobby Chat – 2 credits / request
- Image Generation – 15 credits / image
Free credits
- Try Elvion with free credits on your dashboard
- Request extra test credits via email: elvionailabs@gmail.com
- Or WhatsApp: API GIFT
If your credits are exhausted, calls return 402 Payment Required until you top up.
Seraphina Chat API
Seraphina is Elvion's deep research and analysis model. Use it for factual QA, strategy, planning, and structured reasoning.
Send a message and optional history; receive a structured JSON response with Seraphina's answer and usage stats.
Request body
| Field | Type | Description |
|---|---|---|
| message Required | string | Latest user query or prompt. |
| history Optional | array | Array of past turns: objects with role ("user"/"assistant") and content (string). |
| temperature Optional | float | Controls randomness (0.0–1.0). Default: 0.7. |
| stream Optional | boolean | Set false for single JSON response. Default: true. |
Language examples
curl -X POST "https://web-production-9a18.up.railway.app/api/developer/seraphina/chat" \
-H "Authorization: Bearer YOUR_ELVION_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message": "Explain the implications of quantum entanglement for computing",
"temperature": 0.7,
"stream": false
}'
import requests
import json
API_URL = "https://web-production-9a18.up.railway.app/api/developer/seraphina/chat"
API_KEY = "YOUR_ELVION_API_KEY"
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}
payload = {
"message": "Explain the implications of quantum entanglement for computing",
"temperature": 0.7,
"stream": False
}
response = requests.post(API_URL, headers=headers, json=payload)
if response.status_code == 200:
data = response.json()
print(json.dumps(data, indent=2))
else:
print("Error:", response.status_code)
print(response.text)
const API_URL = "https://web-production-9a18.up.railway.app/api/developer/seraphina/chat";
const API_KEY = "YOUR_ELVION_API_KEY";
async function callSeraphina() {
const payload = {
message: "Explain the implications of quantum entanglement for computing",
temperature: 0.7,
stream: false
};
const res = await fetch(API_URL, {
method: "POST",
headers: {
"Authorization": `Bearer ${API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify(payload)
});
const data = await res.json();
console.log(JSON.stringify(data, null, 2));
}
<?php
$apiUrl = "https://web-production-9a18.up.railway.app/api/developer/seraphina/chat";
$apiKey = "YOUR_ELVION_API_KEY";
$payload = [
'message' => 'Explain the implications of quantum entanglement for computing',
'temperature' => 0.7,
'stream' => false
];
$options = [
'http' => [
'header' => "Content-Type: application/json\r\nAuthorization: Bearer $apiKey\r\n",
'method' => 'POST',
'content' => json_encode($payload)
]
];
$context = stream_context_create($options);
$result = file_get_contents($apiUrl, false, $context);
if ($result === FALSE) {
die('Request failed');
}
$response = json_decode($result, true);
print_r($response);
?>
require 'net/http'
require 'json'
require 'uri'
api_url = URI.parse("https://web-production-9a18.up.railway.app/api/developer/seraphina/chat")
api_key = "YOUR_ELVION_API_KEY"
http = Net::HTTP.new(api_url.host, api_url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(api_url.path)
request["Authorization"] = "Bearer #{api_key}"
request["Content-Type"] = "application/json"
request.body = {
message: "Explain the implications of quantum entanglement for computing",
temperature: 0.7,
stream: false
}.to_json
response = http.request(request)
puts response.body
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
)
func main() {
apiURL := "https://web-production-9a18.up.railway.app/api/developer/seraphina/chat"
apiKey := "YOUR_ELVION_API_KEY"
payload := map[string]interface{
"message": "Explain the implications of quantum entanglement for computing",
"temperature": 0.7,
"stream": false,
}
jsonData, err := json.Marshal(payload)
if err != nil {
fmt.Println("Error marshaling JSON:", err)
return
}
req, err := http.NewRequest("POST", apiURL, bytes.NewBuffer(jsonData))
if err != nil {
fmt.Println("Error creating request:", err)
return
}
req.Header.Set("Authorization", "Bearer "+apiKey)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error making request:", err)
return
}
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println("Response:", string(body))
}
import java.io.*;
import java.net.*;
public class ElvionSeraphina {
public static void main(String[] args) throws Exception {
String apiUrl = "https://web-production-9a18.up.railway.app/api/developer/seraphina/chat";
String apiKey = "YOUR_ELVION_API_KEY";
URL url = new URL(apiUrl);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("Authorization", "Bearer " + apiKey);
conn.setRequestProperty("Content-Type", "application/json");
conn.setDoOutput(true);
String jsonInput = "{\"message\":\"Explain the implications of quantum entanglement for computing\",\"temperature\":0.7,\"stream\":false}";
try (OutputStream os = conn.getOutputStream()) {
byte[] input = jsonInput.getBytes("utf-8");
os.write(input, 0, input.length);
}
try (BufferedReader br = new BufferedReader(
new InputStreamReader(conn.getInputStream(), "utf-8"))) {
StringBuilder response = new StringBuilder();
String line;
while ((line = br.readLine()) != null) {
response.append(line);
}
System.out.println(response.toString());
}
}
}
Test Seraphina Live
Use your API key and a question below to see Seraphina in action directly from this page.
Bobby Chat API
Bobby is your creative coding and writing partner. Use it for code suggestions, stories, and general conversation.
Request body
| Field | Type | Description |
|---|---|---|
| prompt Required | string | Your message or instruction for Bobby. |
| systemPrompt Optional | string | Custom system message to shape Bobby's behavior. |
Language examples
curl -X POST "https://web-production-9a18.up.railway.app/api/developer/bobby/chat" \
-H "Authorization: Bearer YOUR_ELVION_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Write a Python function to reverse a string in-place.",
"systemPrompt": "You are a helpful senior software engineer."
}'
import requests
import json
API_URL = "https://web-production-9a18.up.railway.app/api/developer/bobby/chat"
API_KEY = "YOUR_ELVION_API_KEY"
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}
payload = {
"prompt": "Write a Python function to reverse a string in-place.",
"systemPrompt": "You are a helpful senior software engineer."
}
response = requests.post(API_URL, headers=headers, json=payload)
print(json.dumps(response.json(), indent=2))
const API_URL = "https://web-production-9a18.up.railway.app/api/developer/bobby/chat";
const API_KEY = "YOUR_ELVION_API_KEY";
async function callBobby() {
const payload = {
prompt: "Write a Python function to reverse a string in-place.",
systemPrompt: "You are a helpful senior software engineer."
};
const res = await fetch(API_URL, {
method: "POST",
headers: {
"Authorization": `Bearer ${API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify(payload)
});
const data = await res.json();
console.log(JSON.stringify(data, null, 2));
}
<?php
$apiUrl = "https://web-production-9a18.up.railway.app/api/developer/bobby/chat";
$apiKey = "YOUR_ELVION_API_KEY";
$data = [
'prompt' => "Write a Python function to reverse a string in-place.",
'systemPrompt' => "You are a helpful senior software engineer."
];
$options = [
'http' => [
'header' => "Content-Type: application/json\r\nAuthorization: Bearer $apiKey\r\n",
'method' => 'POST',
'content' => json_encode($data)
]
];
$context = stream_context_create($options);
$result = file_get_contents($apiUrl, false, $context);
echo $result;
?>
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
)
func main() {
apiURL := "https://web-production-9a18.up.railway.app/api/developer/bobby/chat"
apiKey := "YOUR_ELVION_API_KEY"
payload := map[string]interface{
"prompt": "Write a Python function to reverse a string in-place.",
"systemPrompt": "You are a helpful senior software engineer.",
}
jsonData, err := json.Marshal(payload)
if err != nil {
fmt.Println("Error marshaling JSON:", err)
return
}
req, err := http.NewRequest("POST", apiURL, bytes.NewBuffer(jsonData))
if err != nil {
fmt.Println("Error creating request:", err)
return
}
req.Header.Set("Authorization", "Bearer "+apiKey)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error making request:", err)
return
}
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println("Response:", string(body))
}
Test Bobby Live
Ask Bobby for code, copywriting, or a story.
Generate Image API
Turn text prompts into images with multiple artistic styles and resolutions.
The endpoint returns base64-encoded PNG data in an image_b64 field that you can decode or embed directly.
Request body
| Field | Type | Description |
|---|---|---|
| prompt Required | string | Detailed natural language description of the image. |
| model Optional | string | One of v6, photoreal, movie, anime_core, illustration, realistic, deepanime, animelegacy, dreamcore. Default: v6. |
| width Optional | integer | Image width in pixels (64–2048). Default: 1024. |
| height Optional | integer | Image height in pixels (64–2048). Default: 1024. |
Language examples
curl -X POST "https://web-production-9a18.up.railway.app/api/developer/generate-image" \
-H "Authorization: Bearer YOUR_ELVION_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A neon-lit Lagos skyline in a cyberpunk future, ultra-detailed, 4k",
"model": "photoreal",
"width": 1024,
"height": 1024
}'
import requests
import base64
from io import BytesIO
from PIL import Image
API_URL = "https://web-production-9a18.up.railway.app/api/developer/generate-image"
API_KEY = "YOUR_ELVION_API_KEY"
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}
payload = {
"prompt": "A neon-lit Lagos skyline in a cyberpunk future, ultra-detailed, 4k",
"model": "photoreal",
"width": 1024,
"height": 1024
}
response = requests.post(API_URL, headers=headers, json=payload)
if response.status_code == 200:
data = response.json()
image_b64 = data.get("image_b64")
if image_b64:
image_data = base64.b64decode(image_b64)
image = Image.open(BytesIO(image_data))
image.save("elvion_image.png")
print("Image saved as elvion_image.png")
else:
print("Error:", response.status_code)
print(response.text)
const API_URL = "https://web-production-9a18.up.railway.app/api/developer/generate-image";
const API_KEY = "YOUR_ELVION_API_KEY";
async function generateImage() {
const payload = {
prompt: "A neon-lit Lagos skyline in a cyberpunk future, ultra-detailed, 4k",
model: "photoreal",
width: 1024,
height: 1024
};
const res = await fetch(API_URL, {
method: "POST",
headers: {
"Authorization": `Bearer ${API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify(payload)
});
const data = await res.json();
const img = document.createElement('img');
img.src = `data:image/png;base64,${data.image_b64}`;
document.body.appendChild(img);
}
<?php
$apiUrl = "https://web-production-9a18.up.railway.app/api/developer/generate-image";
$apiKey = "YOUR_ELVION_API_KEY";
$data = [
'prompt' => "A neon-lit Lagos skyline in a cyberpunk future, ultra-detailed, 4k",
'model' => 'photoreal',
'width' => 1024,
'height' => 1024
];
$options = [
'http' => [
'header' => "Content-Type: application/json\r\nAuthorization: Bearer $apiKey\r\n",
'method' => 'POST',
'content' => json_encode($data)
]
];
$context = stream_context_create($options);
$result = file_get_contents($apiUrl, false, $context);
$response = json_decode($result, true);
$image_b64 = $response['image_b64'] ?? null;
if ($image_b64) {
$image_data = base64_decode($image_b64);
file_put_contents('elvion_image.png', $image_data);
}
?>
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
class ElvionImage {
static async Task Main(string[] args) {
string apiUrl = "https://web-production-9a18.up.railway.app/api/developer/generate-image";
string apiKey = "YOUR_ELVION_API_KEY";
var payload = new {
prompt = "A neon-lit Lagos skyline in a cyberpunk future, ultra-detailed, 4k",
model = "photoreal",
width = 1024,
height = 1024
};
using (var client = new HttpClient()) {
client.DefaultRequestHeaders.Authorization =
new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", apiKey);
var json = JsonConvert.SerializeObject(payload);
var content = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PostAsync(apiUrl, content);
var responseString = await response.Content.ReadAsStringAsync();
dynamic result = JsonConvert.DeserializeObject(responseString);
string imageB64 = result.image_b64;
var bytes = Convert.FromBase64String(imageB64);
System.IO.File.WriteAllBytes("elvion_image.png", bytes);
}
}
}
Test Image Generation Live
Use your key and prompt to generate an image preview (base64) from the browser.
Response Formats
All endpoints return JSON with predictable structure.
Chat responses
{
"response": "Model's reply as a string...",
"model": "seraphina" // or "bobby",
"credits_used": 5,
"timestamp": "2026-01-09T22:37:00Z",
"usage": {
"prompt_tokens": 42,
"completion_tokens": 358,
"total_tokens": 400
}
}
Image responses
{
"image_b64": "iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAIAAADwf7zU...",
"model": "photoreal",
"width": 1024,
"height": 1024,
"credits_used": 15,
"timestamp": "2026-01-09T22:37:00Z"
}
To display in HTML, set src="data:image/png;base64,IMAGE_B64_HERE" on an <img> tag.
Error Handling
Elvion uses standard HTTP status codes plus JSON error payloads to explain what went wrong.
HTTP status codes
| Status | Meaning | Typical cause |
|---|---|---|
| 200 | OK | Successful request. |
| 400 | Bad Request | Missing or invalid parameters. |
| 401 | Unauthorized | Invalid or missing API key. |
| 402 | Payment Required | Insufficient credits. |
| 429 | Too Many Requests | Rate limit reached; slow down calls. |
| 500 | Internal Error | Unexpected server issue; retry later. |
Error JSON format
{
"error": {
"code": "insufficient_credits",
"message": "Your account has insufficient credits. Required: 5, Available: 2",
"type": "payment_error",
"timestamp": "2026-01-09T22:37:00Z"
}
}
Best Practices
Build fast, reliable, and safe integrations with these guidelines.
Prompt design
- Be explicit: include context, role, and expectations in the prompt.
- For images, specify style, lighting, resolution, and mood.
- Use
systemPromptwith Bobby for persistent behavior (e.g., "You are a Nigerian fintech expert").
Performance & reliability
- Implement retries with exponential backoff on 500/503 errors.
- Cache deterministic responses to save credits and reduce latency.
- Use connection pooling in your HTTP client.
Security
- Never send your API key to the browser or mobile client.
- Sanitize and escape content if you render model output in HTML.
- Monitor usage and rotate keys when teammates leave your project.
Server Integration Examples
Full backend snippets to proxy Elvion requests from your own API.
Node.js (Express)
const express = require("express");
const fetch = require("node-fetch");
const app = express();
app.use(express.json());
const ELVION_API_KEY = process.env.ELVION_API_KEY;
const SERAPHINA_URL = "https://web-production-9a18.up.railway.app/api/developer/seraphina/chat";
app.post("/api/ask-seraphina", async (req, res) => {
try {
const { message } = req.body;
const response = await fetch(SERAPHINA_URL, {
method: "POST",
headers: {
"Authorization": `Bearer ${ELVION_API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({ message, stream: false })
});
const data = await response.json();
res.status(response.status).json(data);
} catch (err) {
console.error("Elvion error:", err);
res.status(500).json({ error: "Internal server error" });
}
});
app.listen(3000, () => {
console.log("Server on http://localhost:3000");
});
Python (FastAPI)
from fastapi import FastAPI, HTTPException
from pydantic import BaseModel
import httpx
import os
app = FastAPI()
ELVION_API_KEY = os.getenv("ELVION_API_KEY")
SERAPHINA_URL = "https://web-production-9a18.up.railway.app/api/developer/seraphina/chat"
class ChatRequest(BaseModel):
message: str
@app.post("/seraphina")
async def seraphina_endpoint(body: ChatRequest):
try:
async with httpx.AsyncClient() as client:
res = await client.post(
SERAPHINA_URL,
headers={
"Authorization": f"Bearer {ELVION_API_KEY}",
"Content-Type": "application/json"
},
json={
"message": body.message,
"stream": False
}
)
if res.status_code != 200:
raise HTTPException(status_code=res.status_code, detail=res.json())
return res.json()
except Exception as e:
raise HTTPException(status_code=500, detail=str(e))
FAQ
Common questions from developers building with Elvion.
General
-
Q: Where do I get my API key?
A: From the Developer Portal after sign-up or login. -
Q: Can I use one key for many apps?
A: Yes, but separate keys per app are recommended for monitoring and safety. -
Q: Do credits expire?
A: No. Credits remain on your account until you use them.
Billing & limits
-
Q: What happens if I hit 0 credits?
A: Elvion returns402 Payment Requireduntil you top up or claim free credits. -
Q: Are there rate limits?
A: Yes, standard per-minute and daily limits apply; contact support for higher tiers.