Skip to main content
Pinecone Docs

Search documentation

Type to search this documentation.

On this pageOverview

Trigger an on-demand self-tuning optimize

Tunes the manifest from real query traffic, then chains a forced re-curate. Every field of the required body is optional, so {} is valid — and a no-op without candidate_queries. The context must be curated, and only one optimize runs at a time.

POST /contexts/{slug}/optimize

  • slug (path, string, required) — Context slug or UUID.
  • X-Pinecone-Api-Version (header, string) — 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.
  • eval_pass_rate_threshold (body, number) — Pass rate a candidate manifest must clear to count as ready.
  • retrieval_p90_latency_ms (body, integer) — The p90 latency bar a candidate must stay under.
  • optimize_timeout_seconds (body, integer) — Default 7200
  • max_iterations (body, integer) — Default 20
  • max_tool_turns (body, integer) — Default 200
  • models (body, string[]) — Model-id overrides passed to the optimize runtime
  • candidate_queries (body, object[]) — Recent query records to tune toward (absent = no-op)
  • pinecone_api_key (body, string) — Task-token override; normally not needed
  • 200 — Optimize enqueued (state: optimizing)
  • 404 — Not found
  • 409 — Context is already optimizing or was never curated
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu