Create a context
Created empty, and not queryable until you import sources and curate them — curate is explicit. Optionally seed a manifest. A work context is the exception: queryable from day zero, built from traces of work rather than documents.
POST /contexts
curl --request POST \
--url https://{host}/api/contexts \
--header 'Authorization: Bearer <token>' \
--header 'X-Pinecone-Api-Version: <x-pinecone-api-version>' \
--header 'Content-Type: application/json' \
--data '{
"slug": "<string>",
"name": "<string>",
"description": "<string>",
"guide": "<string>",
"manifest": {
"curate": {
"chunks": null,
"artifacts": null
},
"optimize": {
"schedule": "<string>",
"latency_threshold_ms": 123,
"min_group_size": 123,
"eval_pass_rate_threshold": 123,
"max_iterations": 123
},
"search": {
"instructions": "<string>"
}
},
"kind": "<string>",
"pinecone_api_key": "<string>"
}'import requests
url = "https://{host}/api/contexts"
payload = {
"slug": "<string>",
"name": "<string>",
"description": "<string>",
"guide": "<string>",
"manifest": {
"curate": {
"chunks": None,
"artifacts": None
},
"optimize": {
"schedule": "<string>",
"latency_threshold_ms": 123,
"min_group_size": 123,
"eval_pass_rate_threshold": 123,
"max_iterations": 123
},
"search": {
"instructions": "<string>"
}
},
"kind": "<string>",
"pinecone_api_key": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"X-Pinecone-Api-Version": "<x-pinecone-api-version>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {method: "POST", headers: {"Authorization": "Bearer <token>", "X-Pinecone-Api-Version": "<x-pinecone-api-version>", "Content-Type": "application/json"}, body: JSON.stringify({
"slug": "<string>",
"name": "<string>",
"description": "<string>",
"guide": "<string>",
"manifest": {
"curate": {
"chunks": null,
"artifacts": null
},
"optimize": {
"schedule": "<string>",
"latency_threshold_ms": 123,
"min_group_size": 123,
"eval_pass_rate_threshold": 123,
"max_iterations": 123
},
"search": {
"instructions": "<string>"
}
},
"kind": "<string>",
"pinecone_api_key": "<string>"
})};
fetch("https://{host}/api/contexts", options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/api/contexts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"slug\":\"<string>\",\"name\":\"<string>\",\"description\":\"<string>\",\"guide\":\"<string>\",\"manifest\":{\"curate\":{\"chunks\":null,\"artifacts\":null},\"optimize\":{\"schedule\":\"<string>\",\"latency_threshold_ms\":123,\"min_group_size\":123,\"eval_pass_rate_threshold\":123,\"max_iterations\":123},\"search\":{\"instructions\":\"<string>\"}},\"kind\":\"<string>\",\"pinecone_api_key\":\"<string>\"}",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Pinecone-Api-Version: <x-pinecone-api-version>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/api/contexts"
payload := strings.NewReader("{\"slug\":\"<string>\",\"name\":\"<string>\",\"description\":\"<string>\",\"guide\":\"<string>\",\"manifest\":{\"curate\":{\"chunks\":null,\"artifacts\":null},\"optimize\":{\"schedule\":\"<string>\",\"latency_threshold_ms\":123,\"min_group_size\":123,\"eval_pass_rate_threshold\":123,\"max_iterations\":123},\"search\":{\"instructions\":\"<string>\"}},\"kind\":\"<string>\",\"pinecone_api_key\":\"<string>\"}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-Pinecone-Api-Version", "<x-pinecone-api-version>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{host}/api/contexts")
.header("Authorization", "Bearer <token>")
.header("X-Pinecone-Api-Version", "<x-pinecone-api-version>")
.header("Content-Type", "application/json")
.body("{\"slug\":\"<string>\",\"name\":\"<string>\",\"description\":\"<string>\",\"guide\":\"<string>\",\"manifest\":{\"curate\":{\"chunks\":null,\"artifacts\":null},\"optimize\":{\"schedule\":\"<string>\",\"latency_threshold_ms\":123,\"min_group_size\":123,\"eval_pass_rate_threshold\":123,\"max_iterations\":123},\"search\":{\"instructions\":\"<string>\"}},\"kind\":\"<string>\",\"pinecone_api_key\":\"<string>\"}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/contexts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-Pinecone-Api-Version"] = '<x-pinecone-api-version>'
request["Content-Type"] = 'application/json'
request.body = "{\"slug\":\"<string>\",\"name\":\"<string>\",\"description\":\"<string>\",\"guide\":\"<string>\",\"manifest\":{\"curate\":{\"chunks\":null,\"artifacts\":null},\"optimize\":{\"schedule\":\"<string>\",\"latency_threshold_ms\":123,\"min_group_size\":123,\"eval_pass_rate_threshold\":123,\"max_iterations\":123},\"search\":{\"instructions\":\"<string>\"}},\"kind\":\"<string>\",\"pinecone_api_key\":\"<string>\"}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"slug": "<string>",
"name": "<string>",
"kind": "<string>",
"workspace": "<string>",
"created_by": "<string>",
"description": "<string>",
"guide": "<string>",
"manifest": {
"curate": {
"chunks": null,
"artifacts": null
},
"optimize": {
"schedule": "<string>",
"latency_threshold_ms": 123,
"min_group_size": 123,
"eval_pass_rate_threshold": 123,
"max_iterations": 123
},
"search": {
"instructions": "<string>"
}
},
"semantic_index": "<string>",
"keyword_index": "<string>",
"is_optimizing": true,
"optimize_task_id": "<string>",
"optimize_score": 123,
"optimize_iterations": 123,
"last_optimized_at": "<string>",
"last_curated_at": "<string>",
"has_sources": true,
"last_source_import_at": "<string>",
"is_curating": true,
"curate_task_id": "<string>",
"is_importing": true,
"import_task_id": "<string>",
"is_exploring": true
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}Authorizations
Section titled “Authorizations”AuthorizationstringrequiredSession token from POST /auth/login, sent as Authorization: Bearer <token>.
Headers
Section titled “Headers”X-Pinecone-Api-Version?stringDate-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.
slugstringrequired3–64 chars, lowercase alnum + hyphens, starts with a letter
namestringrequired1–128 chars
description?stringFree-text summary of what the context will hold.
guide?stringHigh-level standing instructions for the query runtime.
manifest?objectSeed manifest (validated against the manifest schema)
Show child attributes
curate?objectWhat curate builds out of the sources — the chunk leg, the artifact leg, or both.
Show child attributes
chunks?objectThe chunk leg — sources split into passages, embedded for semantic search and optionally indexed for keyword search.
Show child attributes
enabled?booleanWhether curate builds the chunk leg at all.
embedding_model?stringModel that embeds the chunks.
Required string length: 0 - 128
chunking?objectHow a source is cut into chunks.
keyword?objectThe lexical index built alongside the vectors, for exact-term matching.
artifacts?objectThe artifact leg: knowledge an LLM distills out of the sources, as prose files or database rows. Off by default.
Show child attributes
enabled?booleanWhether curate extracts artifacts at all.
artifact_model?stringModel tier that does the extraction. standard reads more carefully at a higher token cost.
artifact_types?object[]What kinds of artifact to extract. Nothing is extracted until at least one is declared.
edge_types?object[]Typed, directed relationships between artifact types, which turn the artifacts into a graph the agent can traverse.
min_doc_count?integerHow many source documents must mention a corpus-scoped subject before it earns an artifact. Raise it to suppress one-off mentions. An artifact type may override it.
Required range: 1 <= x <= 64
max_tokens?integerOutput cap for one extracted artifact, in tokens.
Required range: 128 <= x <= 8192
max_doc_chars?integerInput cap for one extraction call, in characters. With windowing off this also caps how much of a source is read at all; everything beyond it is dropped.
Required range: 1000 <= x <= 2000000
extraction_window_chars?integerWindow size for walking a long source across several extraction calls, so its back half is covered rather than dropped. 0 opts out and reads only the head, up to max_doc_chars.
Required range: 0 <= x <= 1000000
mention_max_chars?integerCap on one recorded mention — what a single document says about the subject — in characters.
Required range: 100 <= x <= 4000
max_mentions_per_artifact?integerHow many mentions are fed into the pass that reduces them into one corpus-wide artifact.
Required range: 1 <= x <= 500
mention_context_chars?integerCap on those mentions once concatenated, in characters. Applied after max_mentions_per_artifact.
Required range: 1000 <= x <= 100000
max_artifacts_per_type?integerHow many artifacts one type may produce. Omit for no cap.
Required range: 1 <= x <= 10000
optimize?objectThe scheduled self-tuning loop: it clusters the queries that answered badly and tries candidate manifests against an ephemeral index until one reproduces the recorded answers.
Show child attributes
schedule?stringCron expression the tuning loop runs on.
Required string length: 0 - 128
latency_threshold_ms?integerA query slower than this counts as a problem worth tuning for, as does any query that fell back from artifacts to chunks. 0 disables the latency test, leaving only fallback.
Required range: 0 <= x <= 600000
min_group_size?integerHow many near-duplicate problem queries must cluster together before the loop tunes for them. Keeps a one-off slow query from triggering a manifest change.
Required range: 1 <= x <= 100
eval_pass_rate_threshold?numberFraction of eval queries a candidate manifest must answer correctly to be considered ready. 1 demands all of them.
Required range: 0 <= x <= 1
max_iterations?integerHow many candidate manifests the loop tries before stopping with its best.
Required range: 1 <= x <= 100
search?objectStanding instructions for the query runtime, pinned on the context rather than sent per turn.
Show child attributes
instructions?stringThe context's default system prompt, applied to every turn in scope. A session's own system_prompt appends to it rather than replacing it.
kind?stringHow the context is built. search — built from source documents, and must be curated before it can be queried. work — built from traces of work done, queryable immediately, consolidated by groom rather than curate.
pinecone_api_key?stringPinecone API key used to provision the context's managed index. Omit it under BYOC, where the deployment holds its own credential.
Response
Section titled “Response”200 — The created context
What context endpoints return — the stored context plus the lifecycle flags derived from its in-flight tasks.
idstringrequiredStable UUID. Accepted anywhere slug is.
slugstringrequiredURL-safe name, unique within the project. Mutable via PUT.
namestringrequiredHuman-readable display name.
kindstringrequiredHow the context is built. search — built from source documents, and must be curated before it can be queried. work — built from traces of work done, queryable immediately, consolidated by groom rather than curate.
workspace?stringOwning workspace. Absent off a workspace-enabled cluster.
created_bystringrequiredPrincipal that created the context.
descriptionstring | nullrequiredFree-text summary of what the context holds.
guide?stringHigh-level standing instructions the query runtime reads on every turn.
manifest?objectPinned manifest document. Absent when the context runs on validator defaults.
Show child attributes
curate?objectWhat curate builds out of the sources — the chunk leg, the artifact leg, or both.
Show child attributes
chunks?objectThe chunk leg — sources split into passages, embedded for semantic search and optionally indexed for keyword search.
Show child attributes
enabled?booleanWhether curate builds the chunk leg at all.
embedding_model?stringModel that embeds the chunks.
Required string length: 0 - 128
chunking?objectHow a source is cut into chunks.
keyword?objectThe lexical index built alongside the vectors, for exact-term matching.
artifacts?objectThe artifact leg: knowledge an LLM distills out of the sources, as prose files or database rows. Off by default.
Show child attributes
enabled?booleanWhether curate extracts artifacts at all.
artifact_model?stringModel tier that does the extraction. standard reads more carefully at a higher token cost.
artifact_types?object[]What kinds of artifact to extract. Nothing is extracted until at least one is declared.
edge_types?object[]Typed, directed relationships between artifact types, which turn the artifacts into a graph the agent can traverse.
min_doc_count?integerHow many source documents must mention a corpus-scoped subject before it earns an artifact. Raise it to suppress one-off mentions. An artifact type may override it.
Required range: 1 <= x <= 64
max_tokens?integerOutput cap for one extracted artifact, in tokens.
Required range: 128 <= x <= 8192
max_doc_chars?integerInput cap for one extraction call, in characters. With windowing off this also caps how much of a source is read at all; everything beyond it is dropped.
Required range: 1000 <= x <= 2000000
extraction_window_chars?integerWindow size for walking a long source across several extraction calls, so its back half is covered rather than dropped. 0 opts out and reads only the head, up to max_doc_chars.
Required range: 0 <= x <= 1000000
mention_max_chars?integerCap on one recorded mention — what a single document says about the subject — in characters.
Required range: 100 <= x <= 4000
max_mentions_per_artifact?integerHow many mentions are fed into the pass that reduces them into one corpus-wide artifact.
Required range: 1 <= x <= 500
mention_context_chars?integerCap on those mentions once concatenated, in characters. Applied after max_mentions_per_artifact.
Required range: 1000 <= x <= 100000
max_artifacts_per_type?integerHow many artifacts one type may produce. Omit for no cap.
Required range: 1 <= x <= 10000
optimize?objectThe scheduled self-tuning loop: it clusters the queries that answered badly and tries candidate manifests against an ephemeral index until one reproduces the recorded answers.
Show child attributes
schedule?stringCron expression the tuning loop runs on.
Required string length: 0 - 128
latency_threshold_ms?integerA query slower than this counts as a problem worth tuning for, as does any query that fell back from artifacts to chunks. 0 disables the latency test, leaving only fallback.
Required range: 0 <= x <= 600000
min_group_size?integerHow many near-duplicate problem queries must cluster together before the loop tunes for them. Keeps a one-off slow query from triggering a manifest change.
Required range: 1 <= x <= 100
eval_pass_rate_threshold?numberFraction of eval queries a candidate manifest must answer correctly to be considered ready. 1 demands all of them.
Required range: 0 <= x <= 1
max_iterations?integerHow many candidate manifests the loop tries before stopping with its best.
Required range: 1 <= x <= 100
search?objectStanding instructions for the query runtime, pinned on the context rather than sent per turn.
Show child attributes
instructions?stringThe context's default system prompt, applied to every turn in scope. A session's own system_prompt appends to it rather than replacing it.
semantic_index?string | nullHost of the index backing this context's vector retrieval. Null until a curate resolves one.
keyword_index?string | nullHost of the index backing keyword retrieval. The same host as semantic_index today — the two names are separate seams over one index.
is_optimizingbooleanrequiredAn optimize task is in flight.
optimize_task_id?string | nullThe optimize task — the running one, or the last to finish.
optimize_score?number | nullEval pass rate the last optimize's best iteration scored.
optimize_iterations?integer | nullHow many candidate manifests the last run tried.
last_optimized_at?string | nullWhen an optimize last persisted a tuned manifest.
last_curated_at?string | nullWhen a curate last flipped a new index version live.
has_sourcesbooleanrequiredThe source tree holds at least one file. False blocks curate.
last_source_import_at?string | nullWhen sources were last staged by an upload or import.
is_curatingbooleanrequiredA curate task is in flight.
curate_task_id?string | nullThe curate task — the running one, or the last to finish.
is_importingbooleanrequiredAn import task is in flight.
import_task_id?string | nullThe import task — the running one, or the last to finish.
is_exploringbooleanrequiredAn explore task is in flight.
explore_task_id?string | nullThe explore task — the running one, or the last to finish.
is_restoringbooleanrequiredA restore task is in flight.
restore_task_id?string | nullThe restore task — the running one, or the last to finish.
manifest_suggestion?objectOutcome of the last explore run, pinned to the context row. A proposal only — apply it by writing the manifest and forcing a curate.
Show child attributes
matchesobject[]requiredProposed templates, best fit first.
Show child attributes
template_idstringrequiredCatalog entry the run proposes for this corpus.
rationalestringrequiredWhy the run thinks this template fits the corpus.
confidencenumberrequiredHow sure the run is, 0–1. Low-confidence proposals are dropped before this point.
nonebooleanrequiredTrue when no template fit
explored_atstringrequiredWhen the run produced this proposal.
task_id?stringThe explore task that produced it.
sample_queries?string[]Example questions the curated corpus can answer, written by the last curate.
is_groomingbooleanrequiredA groom task is in flight. Work contexts only.
groom_task_id?stringThe groom task — the running one, or the last to finish.
groom_artifact_count?integerArtifacts the last groom left in the work context.
last_groomed_at?stringWhen a groom last consolidated the work context.
created_atstringrequiredWhen the context was created.
updated_atstringrequiredWhen the context last changed.
stats?objectAggregate task counters. Populated only on the list endpoint.
Show child attributes
tasks_totalintegerrequiredTasks this context has ever run.
tasks_activeintegerrequiredTasks in a non-terminal state.
tasks_completedintegerrequiredTasks that finished successfully.
tasks_failedintegerrequiredTasks that ended in failure.
tasks_cancelledintegerrequiredRuns stopped before they finished.
tokens_totalintegerrequiredPrompt plus completion tokens across every task.
runtime_secondsintegerrequiredSummed container runtime across every task.