> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pinecone.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Build or rebuild the context's index from its sources

> Curate the staged sources under the active manifest. **Required before querying** — there is no auto-curate. Body is optional; `force: true` rebuilds fully, which is what a manifest edit needs. Search contexts only: a work context builds via `work`/`groom`.



## OpenAPI

````yaml https://raw.githubusercontent.com/pinecone-io/pinecone-api/refs/heads/main/2026-07/nexus_data_2026-07.oas.yaml post /contexts/{slug}/curate
openapi: 3.0.3
info:
  title: Nexus API
  description: >
    Nexus turns a set of sources into a queryable, self-improving knowledge
    base. A context is **sources + a manifest**: upload sources, **curate** them
    into a searchable index, then query it. The manifest, one validated JSON
    document, defines how the context indexes, retrieves and answers.


    Curate is explicit — nothing is queryable until you run it. `{slug}` accepts
    a context's slug or its UUID. Query with `POST /api/query`, one turn per
    call, and read the answer from `output[].content[].text`; multi-turn
    conversations are sessions. Tasks are project-owned at `/api/tasks`, not
    nested under contexts.
  contact:
    name: Pinecone Support
    url: https://support.pinecone.io
    email: support@pinecone.io
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: 2026-07
servers:
  - url: https://{host}/api
    description: Your Nexus deployment host
    variables:
      host:
        default: api.example.com
        description: Host of your Nexus deployment.
security:
  - bearerAuth: []
  - apiKey: []
tags:
  - name: Auth
    description: Login and identity.
  - name: Project
    description: The active Pinecone project and its disclosure state.
  - name: Contexts
    description: A context is sources + a manifest. Curate it explicitly before querying.
  - name: Manifest
    description: Manifest templates and the per-context manifest.
  - name: Source Files
    description: >-
      Per-context source imports (upload, connector, public repo) and the source
      file tree.
  - name: Knowledge
    description: Read-only browse of curated knowledge (chunks + artifacts).
  - name: Curation
    description: Curate workflow trigger, curation ledger, and version-pin primitives.
  - name: Connectors
    description: >-
      Project-level links to external source providers (Box, ...). Linked via
      OAuth or an API key, then used to import source documents into a context.
  - name: Query
    description: >-
      The unified KnowQL Query API: run a query turn (`/query`), fetch a turn
      (`/queries/{id}`), inspect its trace, manage feedback, comparison flags,
      and multi-turn sessions (`/sessions`).
  - name: Tasks
    description: >-
      Top-level, project-owned task records for every workflow (optimize,
      curate, search, work, explore, profile, import, pack, restore, groom).
  - name: Task Files
    description: Read, list, and delete files from live or archived task containers.
paths:
  /contexts/{slug}/curate:
    post:
      tags:
        - Curation
      summary: Build or rebuild the context's index from its sources
      description: >-
        Curate the staged sources under the active manifest. **Required before
        querying** — there is no auto-curate. Body is optional; `force: true`
        rebuilds fully, which is what a manifest edit needs. Search contexts
        only: a work context builds via `work`/`groom`.
      operationId: curate_context
      parameters:
        - in: path
          name: slug
          description: Context slug or UUID.
          required: true
          schema:
            type: string
          style: simple
        - in: header
          name: X-Pinecone-Api-Version
          description: >-
            Date-based contract version, echoed back on the same header. Omit
            for the default (`2026-07`); send `unstable` for the in-development
            surface. An unrecognized value is rejected with `400
            unsupported_api_version`.
          schema:
            default: 2026-07
            x-enum:
              - 2026-07
              - unstable
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CurateContextRequest'
      responses:
        '200':
          description: 'Curate enqueued (`state: importing`)'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowTriggerResponse'
        '400':
          description: Context is a work context
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Context has no sources, is optimizing, or hit the preview task cap
components:
  schemas:
    CurateContextRequest:
      description: Optional overrides for the run. `{}` is a valid incremental curate.
      type: object
      properties:
        force:
          description: Full rebuild rather than incremental
          default: false
          type: boolean
        batch_size:
          description: How many sources curate reads per pass.
          type: integer
        scope:
          description: Curate scope recorded on the task input
          type: string
        trigger:
          description: Provenance label recorded on the task input
          type: string
        model:
          description: Model-id override for the curate runtime
          type: string
        pinecone_api_key:
          description: Task-token override; normally not needed
          type: string
    WorkflowTriggerResponse:
      description: >-
        What every context-workflow trigger returns. The work is asynchronous:
        poll `GET /tasks/{task_id}`. The per-workflow booleans duplicate `state`
        and appear only where a workflow's contract names one.
      type: object
      properties:
        task_id:
          description: The enqueued task. Poll it at `GET /tasks/{id}`.
          type: string
        state:
          description: The forward-looking status the trigger put the context into.
          x-enum:
            - optimizing
            - grooming
            - exploring
            - profiling
            - importing
          type: string
        exploring:
          description: Duplicates `state`; present only for explore
          type: boolean
        profiling:
          description: Duplicates `state`; present only for profile
          type: boolean
        importing:
          description: Duplicates `state`; present only for the import/curate triggers
          type: boolean
      required:
        - task_id
        - state
    Error:
      description: The error envelope every non-2xx response uses.
      type: object
      properties:
        message:
          description: >-
            Human-readable explanation. Not stable — branch on `code`, not on
            this.
          type: string
        code:
          description: >-
            Stable machine-readable code, present only on errors a client must
            branch on. 
          x-enum:
            - unsupported_api_version
            - preview_not_enabled
            - preview_file_limit
            - preview_byte_limit
            - workspace_host_required
            - workspace_not_found
          type: string
      required:
        - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Session token from `POST /auth/login`, sent as `Authorization: Bearer
        <token>`.
    apiKey:
      type: apiKey
      in: header
      name: Api-Key
      description: Pinecone API key, accepted as an alternative to the bearer token.

````