Skip to main content
Pinecone Docs
current

Search documentation

Type to search this documentation.

Estimate the token + time cost of curating the in-progress manifest

Estimates the token and time cost of curating the sources under the manifest in the request body, reported as the task's output (see ProfileEstimateOutput). Persists nothing. Body is optional.

POST /contexts/{slug}/profile

cURL
curl --request POST \
  --url https://{host}/api/contexts/{slug}/profile \
  --header 'Authorization: Bearer <token>' \
  --header 'X-Pinecone-Api-Version: <x-pinecone-api-version>' \
  --header 'Content-Type: application/json' \
  --data '{
  "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>"
    }
  },
  "pinecone_api_key": "<string>"
}'
Python
import requests

url = "https://{host}/api/contexts/{slug}/profile"

payload = {
  "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>"
    }
  },
  "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)
JavaScript
const options = {method: "POST", headers: {"Authorization": "Bearer <token>", "X-Pinecone-Api-Version": "<x-pinecone-api-version>", "Content-Type": "application/json"}, body: JSON.stringify({
  "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>"
    }
  },
  "pinecone_api_key": "<string>"
})};

fetch("https://{host}/api/contexts/{slug}/profile", options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
PHP
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://{host}/api/contexts/{slug}/profile",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\"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>\"}},\"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;
}
Go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://{host}/api/contexts/{slug}/profile"

	payload := strings.NewReader("{\"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>\"}},\"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))

}
Java
HttpResponse<String> response = Unirest.post("https://{host}/api/contexts/{slug}/profile")
  .header("Authorization", "Bearer <token>")
  .header("X-Pinecone-Api-Version", "<x-pinecone-api-version>")
  .header("Content-Type", "application/json")
  .body("{\"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>\"}},\"pinecone_api_key\":\"<string>\"}")
  .asString();
Ruby
require 'uri'
require 'net/http'

url = URI("https://{host}/api/contexts/{slug}/profile")

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 = "{\"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>\"}},\"pinecone_api_key\":\"<string>\"}"

response = http.request(request)
puts response.read_body
200
{
  "task_id": "<string>",
  "state": "<string>",
  "exploring": true,
  "profiling": true,
  "importing": true
}
404
{
  "message": "<string>",
  "code": "<string>"
}
Authorizationstringrequired

Session token from POST /auth/login, sent as Authorization: Bearer <token>.

X-Pinecone-Api-Version?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.

Typestring
Default2026-07
slugstringrequired

Context slug or UUID.

Typestring
manifest?object

In-progress manifest to estimate against (default )

Typeobject
Show child attributes
curate?object

What curate builds out of the sources — the chunk leg, the artifact leg, or both.

Typeobject
Show child attributes
chunks?object

The chunk leg — sources split into passages, embedded for semantic search and optionally indexed for keyword search.

Typeobject
Show child attributes
enabled?boolean

Whether curate builds the chunk leg at all.

Typeboolean
Defaulttrue
embedding_model?string

Model that embeds the chunks.

Required string length: 0 - 128

Typestring
Defaultmultilingual-e5-large
chunking?object

How a source is cut into chunks.

Typeobject
keyword?object

The lexical index built alongside the vectors, for exact-term matching.

Typeobject
artifacts?object

The artifact leg: knowledge an LLM distills out of the sources, as prose files or database rows. Off by default.

Typeobject
Show child attributes
enabled?boolean

Whether curate extracts artifacts at all.

Typeboolean
Defaultfalse
artifact_model?string

Model tier that does the extraction. standard reads more carefully at a higher token cost.

Typestring
Defaultlite
artifact_types?object[]

What kinds of artifact to extract. Nothing is extracted until at least one is declared.

Typeobject[]
edge_types?object[]

Typed, directed relationships between artifact types, which turn the artifacts into a graph the agent can traverse.

Typeobject[]
min_doc_count?integer

How 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

Typeinteger
Default1
max_tokens?integer

Output cap for one extracted artifact, in tokens.

Required range: 128 <= x <= 8192

Typeinteger
Default1500
max_doc_chars?integer

Input 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

Typeinteger
Default60000
extraction_window_chars?integer

Window 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

Typeinteger
Default0
mention_max_chars?integer

Cap on one recorded mention — what a single document says about the subject — in characters.

Required range: 100 <= x <= 4000

Typeinteger
Default400
max_mentions_per_artifact?integer

How many mentions are fed into the pass that reduces them into one corpus-wide artifact.

Required range: 1 <= x <= 500

Typeinteger
Default40
mention_context_chars?integer

Cap on those mentions once concatenated, in characters. Applied after max_mentions_per_artifact.

Required range: 1000 <= x <= 100000

Typeinteger
Default8000
max_artifacts_per_type?integer

How many artifacts one type may produce. Omit for no cap.

Required range: 1 <= x <= 10000

Typeinteger
Default10000
optimize?object

The 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.

Typeobject
Show child attributes
schedule?string

Cron expression the tuning loop runs on.

Required string length: 0 - 128

Typestring
Default0 * * * *
latency_threshold_ms?integer

A 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

Typeinteger
Default60000
min_group_size?integer

How 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

Typeinteger
Default2
eval_pass_rate_threshold?number

Fraction of eval queries a candidate manifest must answer correctly to be considered ready. 1 demands all of them.

Required range: 0 <= x <= 1

Typenumber
Default1
max_iterations?integer

How many candidate manifests the loop tries before stopping with its best.

Required range: 1 <= x <= 100

Typeinteger
Default20
search?object

Standing instructions for the query runtime, pinned on the context rather than sent per turn.

Typeobject
Show child attributes
instructions?string

The context's default system prompt, applied to every turn in scope. A session's own system_prompt appends to it rather than replacing it.

Typestring
pinecone_api_key?string

Task-token override; normally not needed

Typestring

200 — Profile enqueued (state: profiling)

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.

task_idstringrequired

The enqueued task. Poll it at GET /tasks/id.

Typestring
statestringrequired

The forward-looking status the trigger put the context into.

Typestring
exploring?boolean

Duplicates state; present only for explore

Typeboolean
profiling?boolean

Duplicates state; present only for profile

Typeboolean
importing?boolean

Duplicates state; present only for the import/curate triggers

Typeboolean
Suggest an edit

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

Export
Documentation menu