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
Parameters
Section titled “Parameters”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); sendunstablefor the in-development surface. An unrecognized value is rejected with400 unsupported_api_version.
Request body
Section titled “Request body”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 7200max_iterations(body, integer) — Default 20max_tool_turns(body, integer) — Default 200models(body, string[]) — Model-id overrides passed to the optimize runtimecandidate_queries(body, object[]) — Recent query records to tune toward (absent = no-op)pinecone_api_key(body, string) — Task-token override; normally not needed
Responses
Section titled “Responses”200— Optimize enqueued (state: optimizing)404— Not found409— Context is already optimizing or was never curated