Intelligence infrastructure
for applications.
Generate, translate, optimise and transform content through the Faigen Intelligence Core API. Build AI capabilities directly into your applications without coupling your product to a single communication platform.
Quick Start
A Faigen request follows a simple intelligence pipeline: authenticate, describe the operation, provide the content, receive the processed result.
Create an API key
Generate a private Faigen credential from your developer dashboard.
Send a request
Call the Intelligence Core API with your desired operation and content.
Process
Faigen processes the request through the selected intelligence capability.
Consume the result
Your application receives structured output and continues its own workflow.
{
"action": "translate",
"language": "fr",
"content": "Hello from Faigen"
}
Architecture
Faigen is the intelligence layer. Applications remain responsible for their own users, permissions, workflows and business logic.
Text Generation
Generate new content from structured instructions and application-provided context.
{
"action": "generate",
"prompt": "Write a concise welcome message for a new customer.",
"context": {
"tone": "professional",
"channel": "email"
}
}
Translation
Translate application content into a requested target language while preserving the intended communication context.
{
"action": "translate",
"language": "fr",
"content": "Hello from Faigen"
}
Optimisation
Submit existing content for refinement, restructuring, clarity improvements or communication optimisation.
Clarity
Improve readability and communication structure.
Tone
Adapt content to an application-defined tone.
Context
Optimise content for a specified communication environment.
Variations
Create alternative versions for testing and application workflows.
{
"action": "optimise",
"content": "Your original content",
"context": {
"tone": "professional",
"channel": "email"
}
}
Detection
Detect properties of supplied content before deciding which intelligence operation your application should run.
{
"action": "detect",
"content": "Bonjour, comment allez-vous ?"
}
Variants
Generate alternative versions of existing content for testing, personalisation or application workflows.
{
"action": "variants",
"count": 3,
"content": "Welcome to our service.",
"context": {
"tone": "professional"
}
}
Structured Output
Applications can request machine-readable output when AI results need to be consumed directly by software.
{
"action": "generate",
"prompt": "Create a customer profile summary.",
"output": {
"type": "object",
"fields": {
"summary": "string",
"sentiment": "string",
"priority": "string"
}
}
}
Authentication
Authenticate API requests using a private Faigen API key. Credentials should remain server-side.
Authorization: Bearer YOUR_FAIGEN_API_KEY Content-Type: application/json
API Reference
The Faigen Intelligence Core API provides a unified interface for AI operations.
Supported operations
| Action | Purpose | Content |
|---|---|---|
generate |
Generate new content. | Optional |
translate |
Translate supplied content. | Required |
optimise |
Improve existing content. | Required |
detect |
Analyse supplied content. | Required |
variants |
Generate alternative versions. | Required |
Requests
Requests are JSON objects containing an action and the information required by that operation.
{
"action": "translate",
"language": "de",
"content": "Hello from Faigen",
"request_id": "req_123456"
}
| Field | Type | Required | Description |
|---|---|---|---|
action |
string | Yes | AI operation. |
content |
string/object | Depends | Input supplied to Faigen. |
language |
string | Depends | Target language. |
context |
object | No | Application context. |
request_id |
string | Recommended | Application correlation identifier. |
Responses
Successful operations return a structured response containing the operation and processed result.
{
"success": true,
"request_id": "req_123456",
"action": "translate",
"result": "Bonjour de Faigen",
"usage": {
"tokens": 12
}
}
PHP
Example server-side integration using PHP and cURL.
<?php
$payload = array(
'action' => 'translate',
'language' => 'fr',
'content' =>
'Hello from my application',
'request_id' =>
'req_' . bin2hex(
random_bytes(8)
)
);
$ch = curl_init(
'https://faigen.live/api/v1/intelligence'
);
curl_setopt_array(
$ch,
array(
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer ' .
getenv('FAIGEN_API_KEY'),
'Content-Type: application/json'
),
CURLOPT_POSTFIELDS =>
json_encode($payload)
)
);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode(
$response,
true
);
print_r($result);
JavaScript
For browser applications, route private API requests through your own backend rather than exposing your Faigen credential.
const response = await fetch(
'/your-backend/faigen',
{
method: 'POST',
headers: {
'Content-Type':
'application/json'
},
body: JSON.stringify({
action: 'translate',
language: 'fr',
content:
'Hello from my application'
})
}
);
const data =
await response.json();
if (data.success) {
console.log(
data.result
);
}
cURL
curl -X POST \
https://faigen.live/api/v1/intelligence \
-H "Authorization: Bearer YOUR_FAIGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"action": "translate",
"language": "fr",
"content": "Hello from Faigen"
}'
API Keys
API keys identify applications and authorise access to Faigen services.
Private keys
Keep production credentials on trusted server-side infrastructure.
Rotate credentials
Replace credentials when they may have been exposed or compromised.
Usage
Faigen usage can be associated with individual API requests and application activity.
Rate Limits
Applications should treat rate limits as part of normal API operation and implement appropriate retry handling.
Too many requests
Slow the request rate and retry according to the response guidance.
Safe retries
Use request identifiers to help applications safely correlate repeated operations.
Webhooks
Webhooks allow applications to receive asynchronous Faigen events without continuously polling the API.
{
"event": "ai.completed",
"request_id": "req_123456",
"action": "generate",
"status": "completed"
}
Errors
Errors are returned as structured responses so applications can handle failures without losing their original content.
Firetip Integration
Firetip is one application that can consume the Faigen Intelligence Core. Faigen remains independent from Firetip and can be used by other applications and services.
Custom Applications
Any authorised application capable of making HTTPS requests can integrate with Faigen.
SaaS platforms
Add intelligence features directly to application workflows.
Backend systems
Process content through server-side application services.
Automation
Connect AI operations to events and application workflows.
Communication systems
Add translation, optimisation and generation to communication infrastructure.