Universal AI & Financial Data Gateway
POST /api/chat
POST /api/speech
POST /api/vision
POST /api/image
/api/* Endpoints benötigen KEINE Authentifizierung. Nur /vault/* Endpoints benötigen den X-Vault-Key Header!
Universal Chat Endpoint - unterstützt OpenAI & Mistral Modelle
fetch("https://secure-all.replit.app/api/chat", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
messages: [
{ role: "system", content: "Du bist ein hilfreicher Assistent." },
{ role: "user", content: "Hallo!" }
],
model: "gpt-4o-mini",
temperature: 0.7,
max_tokens: 4000
})
}).then(res => res.json())
Text-to-Speech - Konvertiert Text zu Audio (OpenAI TTS)
fetch("https://secure-all.replit.app/api/speech", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
input: "Hallo, das ist ein Test!",
model: "tts-1",
voice: "alloy"
})
}).then(res => res.blob())
.then(blob => {
const audio = new Audio(URL.createObjectURL(blob));
audio.play();
})
Alle Endpoints benötigen KEINE Authentifizierung. Rate Limit: 50 requests / 15 min
Universal Chat - OpenAI & Mistral Auto-Detection
| Parameter | Type | Required | Description |
|---|---|---|---|
messages |
array | REQUIRED | Array von Message-Objekten [{role, content}] |
model |
string | REQUIRED | gpt-4o-mini, gpt-4, mistral-small, etc. |
temperature |
float | Optional | 0.0 - 2.0 (default: 0.7) |
max_tokens |
integer | Optional | Max tokens (default: 4000) |
stream |
boolean | Optional | Streaming (default: false) |
{
"choices": [{
"message": {
"role": "assistant",
"content": "Response text..."
}
}],
"usage": {
"prompt_tokens": 10,
"completion_tokens": 50,
"total_tokens": 60
}
}
Vision Analysis - Bild-Analyse mit GPT-4o-mini/GPT-4o
fetch("https://secure-all.replit.app/api/vision", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
messages: [{
role: "user",
content: [
{ type: "text", text: "Was ist auf dem Bild?" },
{
type: "image_url",
image_url: { url: "https://example.com/bild.jpg" }
}
]
}],
model: "gpt-4o-mini",
max_tokens: 1000,
detail: "high"
})
})
| Parameter | Type | Description |
|---|---|---|
messages |
array | Messages mit text + image_url content |
model |
string | gpt-4o-mini, gpt-4o, gpt-4-turbo, gpt-4-vision-preview |
detail |
string | "low", "high", "auto" (default: "high") |
max_tokens |
integer | Max tokens (default: 1000) |
Text-to-Speech - OpenAI TTS (max 4096 Zeichen)
| Parameter | Type | Description |
|---|---|---|
input |
string | Text (max 4096 Zeichen) |
model |
string | "tts-1" oder "tts-1-hd" |
voice |
string | alloy, echo, fable, onyx, nova, shimmer |
response_format |
string | mp3, opus, aac, flac (default: mp3) |
speed |
float | 0.25 - 4.0 (default: 1.0) |
Image Generation - DALL-E 3
fetch("https://secure-all.replit.app/api/image", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
prompt: "Ein futuristischer Roboter in einer Cyberpunk-Stadt",
size: "1024x1024",
quality: "standard",
style: "vivid"
})
}).then(res => res.json())
| Parameter | Options |
|---|---|
size |
1024x1024, 1792x1024, 1024x1792 |
quality |
"standard" oder "hd" |
style |
"vivid" oder "natural" |
Perplexity Search - Web-Search mit KI
fetch("https://secure-all.replit.app/api/perplexity", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
messages: [
{ role: "user", content: "Neueste Entwicklungen bei KI?" }
],
model: "sonar",
temperature: 0.2,
max_tokens: 1000
})
})
EOD Financial Data - Börsendaten (Real-time, Historical, Intraday)
// Real-time Daten
fetch("https://secure-all.replit.app/api/eod?symbol=AAPL.US&endpoint=real-time")
// Historical Daten
fetch("https://secure-all.replit.app/api/eod?symbol=AAPL.US&endpoint=historical&from=2024-01-01&to=2024-12-31")
// Intraday Daten
fetch("https://secure-all.replit.app/api/eod?symbol=AAPL.US&endpoint=intraday")
| Parameter | Options |
|---|---|
symbol |
AAPL.US, BTC-USD, etc. (REQUIRED) |
endpoint |
real-time, historical, intraday, fundamentals |
period |
d, w, m (für historical) |
from / to |
YYYY-MM-DD (optional für historical/intraday) |
fmt |
json, csv (default: json) |
Gemini AI - Google Gemini Chat
fetch("https://secure-all.replit.app/api/gemini", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
messages: [
{ role: "user", content: "Hallo Gemini!" }
],
model: "gemini-2.0-flash-exp",
temperature: 0.7,
maxTokens: 1000
})
})
| Parameter | Description |
|---|---|
messages |
OpenAI-Style Messages (wird automatisch konvertiert) |
model |
gemini-2.0-flash-exp (default) |
temperature |
0.0 - 2.0 (default: 0.7) |
maxTokens |
Max tokens (default: 1000) |
List Models - Alle verfügbaren Models auflisten
fetch("https://secure-all.replit.app/api/models")
.then(res => res.json())
.then(data => console.log(data.available_models))
Alle Vault-Endpoints benötigen Authentifizierung! Rate Limit: 200 requests / 15 min
X-Vault-Key: your_vault_key oder Query: ?key=your_vault_key
fetch("https://secure-all.replit.app/vault/mistral", {
headers: { "X-Vault-Key": "your_vault_api_key" }
}).then(res => res.json())
Vault Status - Zeigt welche API-Keys konfiguriert sind
Mistral API Key
Anthropic (Claude) API Key
Perplexity API Key
EOD Financial API Key
Stripe API Keys (secret + publishable)
Gemini API Key
Alle Keys - Gibt ALLE konfigurierten API-Keys zurück
{
"error": "Fehlerbeschreibung",
"timestamp": "2025-10-11T12:34:56.789Z"
}
{ error: "..." } zurück - NICHT .error.message!
| Code | Bedeutung | Lösung |
|---|---|---|
400 |
Bad Request | Fehlende/falsche Parameter prüfen |
401 |
Unauthorized | Vault: X-Vault-Key Header fehlt oder falsch |
404 |
Not Found | Service nicht konfiguriert (API-Key fehlt) |
429 |
Too Many Requests | Rate Limit erreicht - warten |
500 |
Internal Server Error | Server-Fehler - später probieren |
503 |
Service Unavailable | API-Key nicht konfiguriert |
| Endpoint Type | Limit | Zeitfenster |
|---|---|---|
/api/* |
50 requests | 15 Minuten |
/vault/* |
200 requests | 15 Minuten |
https://secure-all.replit.app verwenden - NIE andere URLs!
/api/* Endpoints - nur für /vault/*
gpt-* = OpenAI, mistral-* = Mistral
{ error: "..." } zurück (NICHT .error.message!)
/api/* senden
.error.message verwenden (nur .error)
const response = await fetch("https://secure-all.replit.app/api/chat", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
messages: [{ role: "user", content: "Hallo!" }],
model: "gpt-4o-mini",
tools: [{ type: "function", function: { name: "get_weather", ... } }],
tool_choice: "auto"
})
});
const data = await response.json();
const text = data.choices[0].message.content;
const response = await fetch("https://secure-all.replit.app/api/speech", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
input: "Hallo Welt!",
voice: "alloy",
model: "tts-1"
})
});
const blob = await response.blob();
const audio = new Audio(URL.createObjectURL(blob));
audio.play();
const response = await fetch("https://secure-all.replit.app/api/vision", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
messages: [{
role: "user",
content: [
{ type: "text", text: "Was ist auf dem Bild?" },
{ type: "image_url", image_url: { url: "https://example.com/bild.jpg" } }
]
}],
model: "gpt-4o-mini"
})
});
const data = await response.json();
const analysis = data.response;