---
title: "Ask AI a question"
method: POST
path: "/v1/context/ask"
tags: ["Context"]
---

# Ask AI a question

`POST /v1/context/ask`

## Request

- Base URL: `https://app.nex.ai/api/developers`
- URL: `https://app.nex.ai/api/developers/v1/context/ask`
- Auth: API key in header `Authorization`

Query information using natural language. This enhanced endpoint supports three types of queries: (1) questions about specific entities (people, companies), (2) questions about multiple entities at once, and (3) generic workspace-level questions that don't reference specific entities. The AI will analyze your workspace context to provide relevant answers.

## Request body

- DeveloperQueryContextRequest
  - `query` string, required: Natural language query - supports single entity questions (e.g., 'What's the status with techflow.io?'), multi-entity questions (e.g., 'Compare engagement levels of Acme Corp and TechFlow'), or general workspace questions (e.g., 'Which deals are most likely to close this quarter?')

## Response `200`

Query response with relevant information

- DeveloperQueryContextResponse
  - `answer` string: AI-generated response to the query based on available workspace context
  - `entities_considered` object[]: Entities that were analyzed to generate the answer
    - `id` integer: Entity ID
    - `name` string: Entity name
    - `type` string: Entity type (PERSON, COMPANY)
    - `reason` string: Why this entity was considered relevant
    - `insights_matched` integer: Number of insights matched for this entity
    - `score` number: Relevance score
  - `signals_used` object[]: Specific signals/insights used to generate the answer
    - `insight_id` integer: Insight ID
    - `entity_id` integer: Entity ID this signal belongs to
    - `content` string: Signal content excerpt
    - `score` number: Relevance score
    - `type` string: Signal type
  - `metadata` object: Query processing metadata
    - `query_type` 'workspace_wide' | 'entity_specific': Whether the query was about specific entities or workspace-wide
    - `total_entities_searched` integer: Total number of entities searched
    - `confidence` number: Confidence score of the answer

## Other responses

- `400`: Bad request - Invalid query
- `401`: Unauthorized - Invalid or missing API key
- `500`: Internal server error

## Changes

- **2026-02-17** `b05d8cb8cf43`: 1 info
  - api operation id `queryContext` was added
- **2025-11-28** `a5976274057d`: 3 info
  - added the optional property `entities_considered` to the response with the `200` status
  - added the optional property `metadata` to the response with the `200` status
  - added the optional property `signals_used` to the response with the `200` status
- **2025-09-22** `6cf7b0967c6a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/nex/apis/nex-developer-api/changes/v1/context/ask/post.md)

---

[API](https://skmtc.dev/nex/apis/nex-developer-api.md) - [All operations](https://skmtc.dev/nex/apis/nex-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nex/apis/nex-developer-api/revisions/51003af13108?raw)
