curl --request POST \
--url https://app.pepline.ai/api/v1/ingestion_instructions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "<string>",
"targets": [
{
"id": 123
}
]
}
'import requests
url = "https://app.pepline.ai/api/v1/ingestion_instructions"
payload = {
"text": "<string>",
"targets": [{ "id": 123 }]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({text: '<string>', targets: [{id: 123}]})
};
fetch('https://app.pepline.ai/api/v1/ingestion_instructions', 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://app.pepline.ai/api/v1/ingestion_instructions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'text' => '<string>',
'targets' => [
[
'id' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://app.pepline.ai/api/v1/ingestion_instructions"
payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"targets\": [\n {\n \"id\": 123\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.pepline.ai/api/v1/ingestion_instructions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"<string>\",\n \"targets\": [\n {\n \"id\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pepline.ai/api/v1/ingestion_instructions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"<string>\",\n \"targets\": [\n {\n \"id\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"object": "ingestion_instruction",
"id": 123,
"text": "<string>",
"actor": "owner",
"targets": [
{
"type": "source",
"id": 123,
"label": "<string>"
}
],
"archived": true,
"created_at": "2023-11-07T05:31:56Z",
"author": {
"type": "user",
"id": 123,
"label": "<string>"
},
"state": "looked"
}{
"error": {
"type": "authentication_error",
"code": "missing_api_key",
"message": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "missing_api_key",
"message": "<string>",
"param": "<string>"
}
}Ask the reader to look for something
One ask over one or more resources: a whole source (every page), a page, or a fact (the pages that fact came from are read again with the ask, the fact quoted). Steering only — a fact still needs a verbatim excerpt from the page. The pages reached re-read from their cached text (no re-crawl, no credits). The author is your credential.
curl --request POST \
--url https://app.pepline.ai/api/v1/ingestion_instructions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "<string>",
"targets": [
{
"id": 123
}
]
}
'import requests
url = "https://app.pepline.ai/api/v1/ingestion_instructions"
payload = {
"text": "<string>",
"targets": [{ "id": 123 }]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({text: '<string>', targets: [{id: 123}]})
};
fetch('https://app.pepline.ai/api/v1/ingestion_instructions', 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://app.pepline.ai/api/v1/ingestion_instructions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'text' => '<string>',
'targets' => [
[
'id' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://app.pepline.ai/api/v1/ingestion_instructions"
payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"targets\": [\n {\n \"id\": 123\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.pepline.ai/api/v1/ingestion_instructions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"<string>\",\n \"targets\": [\n {\n \"id\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pepline.ai/api/v1/ingestion_instructions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"<string>\",\n \"targets\": [\n {\n \"id\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"object": "ingestion_instruction",
"id": 123,
"text": "<string>",
"actor": "owner",
"targets": [
{
"type": "source",
"id": 123,
"label": "<string>"
}
],
"archived": true,
"created_at": "2023-11-07T05:31:56Z",
"author": {
"type": "user",
"id": 123,
"label": "<string>"
},
"state": "looked"
}{
"error": {
"type": "authentication_error",
"code": "missing_api_key",
"message": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "missing_api_key",
"message": "<string>",
"param": "<string>"
}
}Authorizations
Your secret key (pep_sk_…) from Settings → API. Keys are org-scoped; treat them like passwords.
Body
1Show child attributes
Show child attributes
Response
The instruction.
"ingestion_instruction"What to look for, in the owner's words.
Who wrote it, coarsely — derived from author.
owner, operator, agent Show child attributes
Show child attributes
The credential or person that wrote it. null on asks recorded before authorship was tracked.
Show child attributes
Show child attributes
looked — every page it reaches was read with it; re-reading — some page still owes a re-read; null — it reaches no live page yet.
looked, re-reading, null 
