/v1/meta
Spec
Essayez-le en direct
10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.
Ça marche. Récupérez une clé API et utilisez-la dans votre projet.
Obtenez une clé APIExtraits de code
curl "https://api.oanor.com/truncate-api/v1/meta" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/truncate-api/v1/meta", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/truncate-api/v1/meta");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/truncate-api/v1/meta",
headers={"x-oanor-key": "oanor_test_..."}
)
Exemple de réponse
Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.
{
"data": {
"name": "Truncate API",
"notes": "The ellipsis counts toward the character length. middle keeps the start and end and elides the centre (handy for long paths/IDs). Nothing is stored.",
"version": "v1",
"endpoints": [
{
"path": "/v1/truncate",
"params": {
"text": "the text (required)",
"length": "max characters (default 100)",
"ellipsis": "default …",
"position": "end|start|middle",
"preserve_words": "true/false (default true)"
},
"returns": "the truncated text"
},
{
"path": "/v1/words",
"params": {
"text": "the text (required)",
"words": "max words (default 20)",
"ellipsis": "default …"
},
"returns": "the text cut to N whole words"
},
{
"path": "/v1/meta",
"params": [],
"returns": "this document"
}
],
"description": "Truncate text cleanly. Cut to a maximum number of characters at the end, start or middle, breaking on word boundaries (so words are never chopped in half) and adding an ellipsis — or truncate to a number of whole words. Emoji-safe (counts code points, not bytes). Pure local, no key."
},
"meta": {
"timestamp": "2026-06-03T09:25:09.191Z",
"request_id": "f2ba6b39-048d-4bd8-9aaa-225e2ad2f5b7"
},
"status": "ok",
"message": "Meta",
"success": true
}