API Reference
Complete documentation for the Francis API. All endpoints are hosted at https://francis.verbatims.cc/api/v1.
Authentication
All API requests require an API key passed via the x-api-key header or Authorization: Bearer header. Keys are prefixed with fcs_ and managed through the dashboard.
# Recommended
x-api-key: fcs_a1b2c3d4...
# Alternative
Authorization: Bearer fcs_a1b2c3d4...Endpoints
Detect the language of a text string. Uses franc-all under the hood for trigram-based detection. Returns an ISO 639-3 language code, confidence score, and alternative candidates.
The text to detect.
Minimum text length for reliable detection. Default 10.
Restrict detection to specific ISO 639-3 language codes.
ISO 639-3 code (eng, fra) or und for undetermined.
Raw franc score (lower is better).
Computed confidence from 0 to 1 based on score gap and text length.
Top 5 alternative candidates.
Example request
$ curl -X POST 'https://francis.verbatims.cc/api/v1/detect'
-H 'x-api-key: fcs_...'
-d '{"text": "Bonjour le monde"}'
{ "language": "fra", "confidence": 0.98, "alternatives": ["ita", "spa"] }Translate text into one or more target languages. Uses OpenRouter multi-model AI with automatic fallback. Supports batch translation of up to 10 texts.
Text to translate, or an array of up to 10 texts. Each capped at 5,000 characters.
ISO 639-1 language code(s). Max 10 targets per request.
Source language hint (ISO 639-1). If omitted, the source is auto-detected.
Each entry contains target, text, and optionally detectedSource.
The OpenRouter model used for translation.
Example request
$ curl -X POST 'https://francis.verbatims.cc/api/v1/translate'
-H 'x-api-key: fcs_...'
-d '{"text": "Good morning", "target": ["fr", "de"]}'Health check endpoint. No authentication required. Returns service status and current timestamp.
Retrieve usage statistics for a specific API key. Requires session-based authentication (dashboard login). Returns daily request counts for the last 60 days.
The API key ID to query.
Error codes
Bad Request
Missing or invalid parameters. Check your request body.
Unauthorized
Missing or invalid API key.
Forbidden
You do not have permission to access this resource.
Not Found
The requested resource was not found.
Rate Limited
Daily usage cap exceeded. Try again tomorrow or increase your limit.
Bad Gateway
Translation failed — all AI models returned errors.
Service Unavailable
Service not configured or temporarily unavailable.
Francis