---
title: "Get the AI context"
method: GET
path: "/ai-context/"
tags: ["ai-context", "mcp-always-include"]
---

# Get the AI context

`GET /ai-context/`

## Request

- Base URL: `https://api.getoneprofile.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.getoneprofile.ai/ai-context/`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Get the organization's AI business context: company description, ideal customer profile, buyer personas, interest signals and social proof. Creates an empty record on first read. Includes the latest generation run so a reloaded page can resume polling one that is still running.

## Response `200`

Successful Response

- AiContextReadSchema: The org's business context, plus its latest generation job for resume.
  - `company_description` string, nullable, required
  - `created_at` string, date-time, required
  - `id` string, uuid, required
  - `ideal_buyer_personas` string, nullable, required
  - `ideal_customer_profile` string, nullable, required
  - `interest_signals` string, nullable, required
  - `last_generated_at` string, date-time, nullable, required
  - `latest_generation_job` AiContextGenerationJobReadSchema, required: A generation job's current state. Poll this until `status` is terminal.
    - `created_at` string, date-time, required
    - `domain` string, required: The domain this job is researching.
    - `error` string, nullable, required: Why generation failed: infra trouble, or too little public content.
    - `id` string, uuid, required
    - `status` 'pending' | 'running' | 'succeeded' | 'failed', required: Where a context-generation job has got to. Jobs are born ``RUNNING``: creation validates, inserts and queues the workflow in one call, so there is no separate committed-but-not-started phase. ``PENDING`` exists for schema parity with the other job enums and is never observed. The two terminal states are absorbing: a job never leaves them.
    - `steps` AiStep[]: What the research did, one step per piece of work once it is done: the documents and pages it read, the sections it wrote. Grows while the job runs; kept once it finishes.
      - `action` string, required: What kind of move this was, e.g. `read_table`, `plan`, `write_column`.
      - `detail` string: The step's input: the instruction, the column it read, the query it ran.
      - `duration_ms` integer, nullable: Wall clock for the work this step describes, never an estimate.
      - `observation` string: One line on what came back. The half that makes a step worth reading.
      - `outcome` string: `completed`, `failed`, `refused` or `stopped`. Clients must tolerate new tokens.
      - `thought` string, nullable: The model's stated reasoning for choosing this step. Set by the agent loop; the assistant surfaces leave it null, and the renderer simply omits the rung.
    - `updated_at` string, date-time, required
  - `social_proof` string, nullable, required
  - `source_domain` string, nullable, required: The domain last used to generate these fields; null until a generation succeeds.
  - `updated_at` string, date-time, required
  - `voice` string, nullable, required: How the company words things: spelling, formality, what it calls its product and its buyers, jargon it avoids. The outbound agent matches it in every message.

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `422`: Invalid request made to the API.
- `500`: Internal server error.
- `502`: Bad gateway error.
- `503`: Service unavailable.

---

[API](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile.md) · [All operations](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/llms.txt) · [OpenAPI document](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/revisions/4a6bd71e3f02?raw)
