CV AI logoCV AI.

Developer/API

API AI Gateway

Instantané de l’implémentation actuelle. Cette surface évolue rapidement.

Documentation provisoire : contrats, en-têtes et règles de scopes peuvent changer.

Mode public: Les endpoints de chat managé sont retirés de l'API publique. Utilisez les APIs CV et les outils MCP CV.

API PAT directe: Utilisez votre token API personnel directement sur le même host que cette page. Host de production : https://app.doxai.ch

URL de base

https://app.doxai.ch

Authentification

Les tokens API personnels sont créés depuis la page compte et envoyés comme Bearer tokens.

Authorization: Bearer <personal_api_token>
Ouvrir la gestion des tokens

URL serveur MCP

Pour ChatGPT MCP / clients distants, utilisez l'endpoint HTTP streamable ci-dessous.

https://app.doxai.ch/v1/mcp

OpenAPI

Les specs machine-readable sont servies sur /openapi.json et /v1/openapi.json.

https://app.doxai.ch/openapi.json
https://app.doxai.ch/v1/openapi.json

Templates et valeurs de style

Utilisez GET /v1/resume/templates?locale=fr pour découvrir les valeurs valides de template, theme_color, font_family et font_size avant de créer un job.

curl -sS "https://app.doxai.ch/v1/resume/templates?locale=fr" \
  -H "Authorization: Bearer $TOKEN"

Body de requête

POST /v1/resume/jobs attend une enveloppe avec request_id et cv_data. cv_data.language accepte en, fr et de pour localiser les titres de sections par défaut et le libellé Présent. N'envoyez pas sections.*.type — il est déduit automatiquement par le serveur (accepté mais ignoré s'il est fourni) ; voir l'exemple cv_data ci-dessous.

{
  "request_id": "demo-job-001",
  "language": "fr",
  "cv_data": {
    "template": "original",
    "language": "fr",
    "theme_color": "NavyBlue",
    "font_family": "arial",
    "font_size": "11pt",
    "identity": {
      "first_name": "Ada",
      "last_name": "Lovelace"
    },
    "sections": {
      "summary": {
        "content": "Profil synthétique."
      }
    }
  }
}

En-têtes communs

  • Authorization: Bearer ...
  • x-request-id optionnel comme en-tête de corrélation de requête
  • body.request_id requis pour /v1/resume/jobs et resume.create_job
  • x-ai-mode optionnel sur /v1/models pour inspecter les surfaces managed|api|mcp (défaut : api)
  • Les routes publiques de chat managé sont retirées ; x-ai-mode ne les réactive pas

Scopes de token

  • chat:run
  • resume:generate
  • tools:invoke
  • mcp:connect

Champs de tier

Les réponses exposent à la fois des clés internes pour la logique et des labels publics pour l'affichage.

  • tier = free|credits|subscription
  • tier_label = free|flex|pro
  • model.access = all|paid|subscription

`paid` est une classe d'accès interne pour les modèles non gratuits. Elle correspond à l'éligibilité Flex et Pro, pas à un nom de plan public.

Système

GET/healthzpublic

Liveness check.

GET/readyzpublic

Readiness check (Supabase dependency).

GET/versionpublic

Gateway runtime/version info.

GET/openapi.jsonpublic

OpenAPI document as JSON.

GET/v1/openapi.jsonpublic

OpenAPI document as JSON under /v1.

Inspection Auth

GET/v1/auth/mepublic

Resolve token principal and scopes.

GET/v1/auth/check/chatchat:run

Scope probe.

GET/v1/auth/check/resumeresume:generate

Scope probe.

GET/v1/auth/check/toolstools:invoke

Scope probe.

GET/v1/auth/check/mcpmcp:connect

Scope probe.

Modèles

GET/v1/modelschat:run

List models with per-user allow/deny decisions, protocol/origin metadata, surfaces, tier, and tier_label.

Use header x-ai-mode: managed|api|mcp (default: api) to inspect surface-specific availability.

Chat

POST/v1/chat/completionschat:run

Retired public managed chat route.

Returns 410 managed_chat_removed.

POST/v1/responseschat:run

Retired public managed responses route.

Returns 410 managed_chat_removed.

POST/v1/studio/chatchat:run

Internal studio bridge.

Internal service-only route; not part of the public integration surface.

Facturation

GET/v1/billing/statuschat:run

Current tier, tier_label, wallet balance, real-usage flag, and Pro allowance state.

subscription_chat_allowance is null unless tier=subscription.

GET/v1/billing/usagechat:run

Usage report summary plus per-event token, USD, and billed-credit views.

Query params: from, to (ISO), limit.

Jobs CV

GET/v1/resume/templatesresume:generate

List supported templates, colors, fonts, sizes, and preview URLs.

Optional query param: locale=en|fr|de.

POST/v1/resume/jobsresume:generate

Create async resume job.

Requires body.request_id. Canonical item bullets field: description_bullets. Alias bullets is accepted and normalized with warnings. Compute billed (compile_tool): picture=2, original/harvard/business/sidebar first free then 1.

GET/v1/resume/jobs/:jobIdresume:generate

Get job status.

Poll job.status (not top-level status). Values: queued | running | succeeded | failed | canceled.

GET/v1/resume/jobs/:jobId/pdfresume:generate

Download PDF artifact.

MCP

POST/v1/mcpmcp:connect

Primary MCP JSON-RPC endpoint (streamable HTTP).

Send initialize first, then use tools/list, resources/list, tools/call, and resources/read with MCP-Session-Id.

GET/v1/mcpmcp:connect

Attach SSE stream to an existing MCP session.

Requires MCP-Session-Id header.

DELETE/v1/mcpmcp:connect

Close MCP session.

GET/v1/mcp/ssemcp:connect

Legacy SSE MCP transport (compatibility).

POST/v1/mcp/messagesmcp:connect

Legacy SSE MCP message ingress.

Use query session_id from endpoint event.

GET/v1/mcp/toolsmcp:connect

Convenience REST wrapper to list tools.

POST/v1/mcp/tools/callmcp:connect

Convenience REST wrapper to invoke tool.

Démarrage rapide API CV

RESPONSE=$(curl -sS "https://app.doxai.ch/v1/resume/jobs" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "request_id":"demo-job-001",
    "cv_data": {
  "template": "original",
  "language": "en",
  "theme_color": "NavyBlue",
  "font_size": "11pt",
  "font_family": "arial",
  "identity": {
    "first_name": "Leif",
    "last_name": "Doxarve",
    "jobtitle": "AI Product Engineer",
    "email": "leif@example.com",
    "mobile": "+41 79 123 45 67",
    "address": "Lausanne, Switzerland",
    "linkedin": "https://linkedin.com/in/leif-doxarve",
    "github": "https://github.com/mieleif",
    "website": "https://doxai.ch"
  },
  "sections_order": ["summary", "experience", "education", "projects", "skills", "languages"],
  "sections": {
    "summary": {
      "content": "AI product engineer focused on practical automation, LLM integrations, and scalable orchestration."
    },
    "experience": {
      "items": [
        {
          "title": "DoxAI",
          "subtitle": "Founder & Product Engineer",
          "location": "Lausanne, CH",
          "start": "2024-06",
          "end": "Present",
          "description_bullets": [
            "Built AI-assisted CV platform with public API and MCP-compatible tools.",
            "Implemented billing-aware gateway architecture with provider abstraction and failover.",
            "Operated Docker-based deployments with Traefik, GitHub Actions, and Supabase."
          ]
        },
        {
          "title": "Consulting Projects",
          "subtitle": "Software Engineer",
          "location": "Remote",
          "start": "2022-01",
          "end": "2024-05",
          "description_bullets": [
            "Delivered full-stack web apps with TypeScript, React, and Node.js.",
            "Integrated third-party APIs and automated reporting pipelines."
          ]
        }
      ]
    },
    "education": {
      "items": [
        {
          "title": "University Example",
          "subtitle": "BSc in Computer Science",
          "location": "Switzerland",
          "start": "2018-09",
          "end": "2021-07",
          "description_bullets": [
            "Focus: software engineering, data systems, and applied machine learning."
          ]
        }
      ]
    },
    "projects": {
      "items": [
        {
          "title": "CV API Gateway",
          "subtitle": "Public Tools-Only Runtime",
          "start": "2026-02",
          "end": "Present",
          "description_bullets": [
            "Exposed authenticated resume tooling for agent/CLI consumption.",
            "Added compile-action credit billing and idempotent request handling."
          ]
        }
      ]
    },
    "skills": {
      "items": [
        {
          "title": "Tech Stack",
          "description_bullets": [
            "TypeScript",
            "Node.js",
            "Next.js",
            "Fastify",
            "Supabase",
            "Docker",
            "Traefik",
            "GitHub Actions",
            "PostgreSQL"
          ]
        }
      ]
    },
    "languages": {
      "items": [
        {
          "title": "Languages",
          "description_bullets": [
            "French (native)",
            "English (professional)"
          ]
        }
      ]
    }
  }
}
  }')

JOB_ID=$(echo "$RESPONSE" | jq -r '.job_id')

curl -sS "https://app.doxai.ch/v1/resume/jobs/$JOB_ID" \
  -H "Authorization: Bearer $TOKEN" | jq '{job_id: .job.id, status: .job.status, warnings: .warnings}'

Réponse de polling CV

Interrogez GET /v1/resume/jobs/:jobId et lisez job.status. Valeurs possibles : queued, running, succeeded, failed, canceled.

{
  "ok": true,
  "request_id": "req_123",
  "warnings": [],
  "job": {
    "id": "f5821b92-9100-44ce-a610-c85c2499fe5b",
    "request_id": "demo-job-001",
    "mode": "managed",
    "status": "running",
    "created_at": "2026-03-17T15:00:00.000Z",
    "updated_at": "2026-03-17T15:00:01.000Z"
  }
}

Outils MCP

Les outils sont regroupés par namespace. Appelez tools/list pour obtenir les schémas d’entrée et de sortie, titres et annotations faisant foi.

app.*

Public server metadata and discovery.

  • app.get_info

account.*

Authenticated account and billing state.

  • account.get_billing_status

resume.*

Validation, templates, compilation, and job retrieval.

  • resume.create_job
  • resume.validate_cv_data
  • resume.get_create_job_example
  • resume.get_job
  • resume.get_pdf
  • resume.list_templates
  • resume.list_jobs

cv.*

User-owned saved resumes and normalized CV entries.

  • cv.list_resumes
  • cv.get_resume
  • cv.create_resume
  • cv.update_resume
  • cv.list_entries
  • cv.upsert_entry

Ressources MCP

Les lectures de ressources sont limitées à l’utilisateur authentifié. Utilisez resources/list pour découvrir les URI des CV enregistrés.

  • cv://templates

    Static resume-template catalog.

  • cv://resumes

    Index of the authenticated user's saved resumes.

  • cv://resumes/{id}

    Stored JSON snapshot for one authenticated-user-owned resume.

  • cv://profile

    Authenticated user's profile and normalized CV entries.

Versions du protocole

Le serveur négocie la version mutuellement prise en charge la plus récente lors de initialize. La sortie structurée des outils est disponible avec 2025-11-25 et 2025-06-18.

2025-11-252025-06-182025-03-262024-11-05
curl -sS -D /tmp/mcp_headers.txt "https://app.doxai.ch/v1/mcp" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -H "MCP-Protocol-Version: 2025-11-25" \
  -d '{"jsonrpc":"2.0","id":"init-1","method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"cli","version":"0.1.0"}}}'

SESSION_ID=$(grep -i '^MCP-Session-Id:' /tmp/mcp_headers.txt | awk '{print $2}' | tr -d '\r')

curl -X POST "https://app.doxai.ch/v1/mcp" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -H "MCP-Session-Id: $SESSION_ID" \
  -H "MCP-Protocol-Version: 2025-11-25" \
  -d '{"jsonrpc":"2.0","id":"tools-1","method":"tools/list","params":{}}'

Connecter votre agent

Créez un token API personnel avec mcp:connect, puis adaptez cette entrée de serveur distant à votre client MCP. Les clients compatibles OAuth peuvent s’authentifier via la découverte de ressource protégée du serveur.

{
  "mcpServers": {
    "cv-doxai": {
      "url": "https://app.doxai.ch/v1/mcp",
      "headers": {
        "Authorization": "Bearer <token_with_mcp:connect>"
      }
    }
  }
}

initializenotifications/initialized tools/list / resources/list tools/call / resources/read

Exemple public cv_data

Payload de départ copiable pour /v1/resume/jobs ou MCP resume.create_job. Utilise les tableaux description_bullets canoniques pour le rendu PDF. title s'affiche en premier, subtitle en second. N'envoyez pas sections.*.type : le serveur le déduit automatiquement — les éléments avec des dates ou un lieu deviennent "main"/chronologie, sinon "secondary"/liste. En disposition liste, les subtitles peuvent ne pas s'afficher : placez cette information dans les description_bullets.

{
  "template": "original",
  "language": "en",
  "theme_color": "NavyBlue",
  "font_size": "11pt",
  "font_family": "arial",
  "identity": {
    "first_name": "Leif",
    "last_name": "Doxarve",
    "jobtitle": "AI Product Engineer",
    "email": "leif@example.com",
    "mobile": "+41 79 123 45 67",
    "address": "Lausanne, Switzerland",
    "linkedin": "https://linkedin.com/in/leif-doxarve",
    "github": "https://github.com/mieleif",
    "website": "https://doxai.ch"
  },
  "sections_order": ["summary", "experience", "education", "projects", "skills", "languages"],
  "sections": {
    "summary": {
      "content": "AI product engineer focused on practical automation, LLM integrations, and scalable orchestration."
    },
    "experience": {
      "items": [
        {
          "title": "DoxAI",
          "subtitle": "Founder & Product Engineer",
          "location": "Lausanne, CH",
          "start": "2024-06",
          "end": "Present",
          "description_bullets": [
            "Built AI-assisted CV platform with public API and MCP-compatible tools.",
            "Implemented billing-aware gateway architecture with provider abstraction and failover.",
            "Operated Docker-based deployments with Traefik, GitHub Actions, and Supabase."
          ]
        },
        {
          "title": "Consulting Projects",
          "subtitle": "Software Engineer",
          "location": "Remote",
          "start": "2022-01",
          "end": "2024-05",
          "description_bullets": [
            "Delivered full-stack web apps with TypeScript, React, and Node.js.",
            "Integrated third-party APIs and automated reporting pipelines."
          ]
        }
      ]
    },
    "education": {
      "items": [
        {
          "title": "University Example",
          "subtitle": "BSc in Computer Science",
          "location": "Switzerland",
          "start": "2018-09",
          "end": "2021-07",
          "description_bullets": [
            "Focus: software engineering, data systems, and applied machine learning."
          ]
        }
      ]
    },
    "projects": {
      "items": [
        {
          "title": "CV API Gateway",
          "subtitle": "Public Tools-Only Runtime",
          "start": "2026-02",
          "end": "Present",
          "description_bullets": [
            "Exposed authenticated resume tooling for agent/CLI consumption.",
            "Added compile-action credit billing and idempotent request handling."
          ]
        }
      ]
    },
    "skills": {
      "items": [
        {
          "title": "Tech Stack",
          "description_bullets": [
            "TypeScript",
            "Node.js",
            "Next.js",
            "Fastify",
            "Supabase",
            "Docker",
            "Traefik",
            "GitHub Actions",
            "PostgreSQL"
          ]
        }
      ]
    },
    "languages": {
      "items": [
        {
          "title": "Languages",
          "description_bullets": [
            "French (native)",
            "English (professional)"
          ]
        }
      ]
    }
  }
}