v1.1.0 Modèle par défaut : gpt-5.6-luna. Lecture seule, sans historique.
TOKEN=$(cat ~/.config/codex-api/token)
curl http://127.0.0.1:8766/v1/chat/completions \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"messages":[{"role":"user","content":"Bonjour !"}]}'
La réponse se trouve dans choices[0].message.content.
Pour obtenir un identifiant immédiatement, ajoutez "async":true au JSON, puis interrogez GET /v1/chat/completions/<id> avec le même jeton.
GET /health — état, sans authentificationGET /v1/models — modèles rapides disponiblesPOST /v1/chat/completions — conversation statelessGET /v1/chat/completions/<id> — état et résultat d'une tâche asynchroneGET /openapi.json — contrat OpenAPI 3.1Documentation complète : /home/arnaud/codex-api/README.md.