Sponsorships
Request sponsorship research
Start bounded research and return its progress for later retrieval.
POST
/
v1
/
sponsorships
/
requests
Request sponsorship research
curl --request POST \
--url https://api.upriver.ai/v1/sponsorships/requests \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"idempotency_key": "<string>",
"platforms": [],
"budget": {
"max_candidates": 5000,
"max_scanned_rows": 500000,
"max_llm_calls": 5000,
"concurrency": 8,
"max_unknown_candidates": 500
},
"publication_ids": [],
"keywords": [],
"categories": [],
"category_subject": "publication_vertical",
"unknown_category_policy": "report_partial",
"recall_terms": [],
"published_from": "2023-11-07T05:31:56Z",
"published_until": "2023-11-07T05:31:56Z",
"include_undated": true,
"evidence_surfaces": [
"canonical_text"
]
}
'import requests
url = "https://api.upriver.ai/v1/sponsorships/requests"
payload = {
"idempotency_key": "<string>",
"platforms": [],
"budget": {
"max_candidates": 5000,
"max_scanned_rows": 500000,
"max_llm_calls": 5000,
"concurrency": 8,
"max_unknown_candidates": 500
},
"publication_ids": [],
"keywords": [],
"categories": [],
"category_subject": "publication_vertical",
"unknown_category_policy": "report_partial",
"recall_terms": [],
"published_from": "2023-11-07T05:31:56Z",
"published_until": "2023-11-07T05:31:56Z",
"include_undated": True,
"evidence_surfaces": ["canonical_text"]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
idempotency_key: '<string>',
platforms: [],
budget: {
max_candidates: 5000,
max_scanned_rows: 500000,
max_llm_calls: 5000,
concurrency: 8,
max_unknown_candidates: 500
},
publication_ids: [],
keywords: [],
categories: [],
category_subject: 'publication_vertical',
unknown_category_policy: 'report_partial',
recall_terms: [],
published_from: '2023-11-07T05:31:56Z',
published_until: '2023-11-07T05:31:56Z',
include_undated: true,
evidence_surfaces: ['canonical_text']
})
};
fetch('https://api.upriver.ai/v1/sponsorships/requests', 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://api.upriver.ai/v1/sponsorships/requests",
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([
'idempotency_key' => '<string>',
'platforms' => [
],
'budget' => [
'max_candidates' => 5000,
'max_scanned_rows' => 500000,
'max_llm_calls' => 5000,
'concurrency' => 8,
'max_unknown_candidates' => 500
],
'publication_ids' => [
],
'keywords' => [
],
'categories' => [
],
'category_subject' => 'publication_vertical',
'unknown_category_policy' => 'report_partial',
'recall_terms' => [
],
'published_from' => '2023-11-07T05:31:56Z',
'published_until' => '2023-11-07T05:31:56Z',
'include_undated' => true,
'evidence_surfaces' => [
'canonical_text'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://api.upriver.ai/v1/sponsorships/requests"
payload := strings.NewReader("{\n \"idempotency_key\": \"<string>\",\n \"platforms\": [],\n \"budget\": {\n \"max_candidates\": 5000,\n \"max_scanned_rows\": 500000,\n \"max_llm_calls\": 5000,\n \"concurrency\": 8,\n \"max_unknown_candidates\": 500\n },\n \"publication_ids\": [],\n \"keywords\": [],\n \"categories\": [],\n \"category_subject\": \"publication_vertical\",\n \"unknown_category_policy\": \"report_partial\",\n \"recall_terms\": [],\n \"published_from\": \"2023-11-07T05:31:56Z\",\n \"published_until\": \"2023-11-07T05:31:56Z\",\n \"include_undated\": true,\n \"evidence_surfaces\": [\n \"canonical_text\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://api.upriver.ai/v1/sponsorships/requests")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"idempotency_key\": \"<string>\",\n \"platforms\": [],\n \"budget\": {\n \"max_candidates\": 5000,\n \"max_scanned_rows\": 500000,\n \"max_llm_calls\": 5000,\n \"concurrency\": 8,\n \"max_unknown_candidates\": 500\n },\n \"publication_ids\": [],\n \"keywords\": [],\n \"categories\": [],\n \"category_subject\": \"publication_vertical\",\n \"unknown_category_policy\": \"report_partial\",\n \"recall_terms\": [],\n \"published_from\": \"2023-11-07T05:31:56Z\",\n \"published_until\": \"2023-11-07T05:31:56Z\",\n \"include_undated\": true,\n \"evidence_surfaces\": [\n \"canonical_text\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upriver.ai/v1/sponsorships/requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"idempotency_key\": \"<string>\",\n \"platforms\": [],\n \"budget\": {\n \"max_candidates\": 5000,\n \"max_scanned_rows\": 500000,\n \"max_llm_calls\": 5000,\n \"concurrency\": 8,\n \"max_unknown_candidates\": 500\n },\n \"publication_ids\": [],\n \"keywords\": [],\n \"categories\": [],\n \"category_subject\": \"publication_vertical\",\n \"unknown_category_policy\": \"report_partial\",\n \"recall_terms\": [],\n \"published_from\": \"2023-11-07T05:31:56Z\",\n \"published_until\": \"2023-11-07T05:31:56Z\",\n \"include_undated\": true,\n \"evidence_surfaces\": [\n \"canonical_text\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"status": "queued",
"scanned_rows": 1,
"matched_candidates": 1,
"completed_candidates": 1,
"pending_candidates": 1,
"unknown_rows": 1,
"scan_complete": true,
"coverage": {},
"source_boundary": {
"source_table": "<string>",
"snapshot_id": 123,
"snapshot_committed_at": "2023-11-07T05:31:56Z"
},
"captured_at": "2023-11-07T05:31:56Z",
"reasons": [],
"results": []
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Body
application/json
Response
Successful Response
⌘I
Request sponsorship research
curl --request POST \
--url https://api.upriver.ai/v1/sponsorships/requests \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"idempotency_key": "<string>",
"platforms": [],
"budget": {
"max_candidates": 5000,
"max_scanned_rows": 500000,
"max_llm_calls": 5000,
"concurrency": 8,
"max_unknown_candidates": 500
},
"publication_ids": [],
"keywords": [],
"categories": [],
"category_subject": "publication_vertical",
"unknown_category_policy": "report_partial",
"recall_terms": [],
"published_from": "2023-11-07T05:31:56Z",
"published_until": "2023-11-07T05:31:56Z",
"include_undated": true,
"evidence_surfaces": [
"canonical_text"
]
}
'import requests
url = "https://api.upriver.ai/v1/sponsorships/requests"
payload = {
"idempotency_key": "<string>",
"platforms": [],
"budget": {
"max_candidates": 5000,
"max_scanned_rows": 500000,
"max_llm_calls": 5000,
"concurrency": 8,
"max_unknown_candidates": 500
},
"publication_ids": [],
"keywords": [],
"categories": [],
"category_subject": "publication_vertical",
"unknown_category_policy": "report_partial",
"recall_terms": [],
"published_from": "2023-11-07T05:31:56Z",
"published_until": "2023-11-07T05:31:56Z",
"include_undated": True,
"evidence_surfaces": ["canonical_text"]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
idempotency_key: '<string>',
platforms: [],
budget: {
max_candidates: 5000,
max_scanned_rows: 500000,
max_llm_calls: 5000,
concurrency: 8,
max_unknown_candidates: 500
},
publication_ids: [],
keywords: [],
categories: [],
category_subject: 'publication_vertical',
unknown_category_policy: 'report_partial',
recall_terms: [],
published_from: '2023-11-07T05:31:56Z',
published_until: '2023-11-07T05:31:56Z',
include_undated: true,
evidence_surfaces: ['canonical_text']
})
};
fetch('https://api.upriver.ai/v1/sponsorships/requests', 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://api.upriver.ai/v1/sponsorships/requests",
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([
'idempotency_key' => '<string>',
'platforms' => [
],
'budget' => [
'max_candidates' => 5000,
'max_scanned_rows' => 500000,
'max_llm_calls' => 5000,
'concurrency' => 8,
'max_unknown_candidates' => 500
],
'publication_ids' => [
],
'keywords' => [
],
'categories' => [
],
'category_subject' => 'publication_vertical',
'unknown_category_policy' => 'report_partial',
'recall_terms' => [
],
'published_from' => '2023-11-07T05:31:56Z',
'published_until' => '2023-11-07T05:31:56Z',
'include_undated' => true,
'evidence_surfaces' => [
'canonical_text'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://api.upriver.ai/v1/sponsorships/requests"
payload := strings.NewReader("{\n \"idempotency_key\": \"<string>\",\n \"platforms\": [],\n \"budget\": {\n \"max_candidates\": 5000,\n \"max_scanned_rows\": 500000,\n \"max_llm_calls\": 5000,\n \"concurrency\": 8,\n \"max_unknown_candidates\": 500\n },\n \"publication_ids\": [],\n \"keywords\": [],\n \"categories\": [],\n \"category_subject\": \"publication_vertical\",\n \"unknown_category_policy\": \"report_partial\",\n \"recall_terms\": [],\n \"published_from\": \"2023-11-07T05:31:56Z\",\n \"published_until\": \"2023-11-07T05:31:56Z\",\n \"include_undated\": true,\n \"evidence_surfaces\": [\n \"canonical_text\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://api.upriver.ai/v1/sponsorships/requests")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"idempotency_key\": \"<string>\",\n \"platforms\": [],\n \"budget\": {\n \"max_candidates\": 5000,\n \"max_scanned_rows\": 500000,\n \"max_llm_calls\": 5000,\n \"concurrency\": 8,\n \"max_unknown_candidates\": 500\n },\n \"publication_ids\": [],\n \"keywords\": [],\n \"categories\": [],\n \"category_subject\": \"publication_vertical\",\n \"unknown_category_policy\": \"report_partial\",\n \"recall_terms\": [],\n \"published_from\": \"2023-11-07T05:31:56Z\",\n \"published_until\": \"2023-11-07T05:31:56Z\",\n \"include_undated\": true,\n \"evidence_surfaces\": [\n \"canonical_text\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upriver.ai/v1/sponsorships/requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"idempotency_key\": \"<string>\",\n \"platforms\": [],\n \"budget\": {\n \"max_candidates\": 5000,\n \"max_scanned_rows\": 500000,\n \"max_llm_calls\": 5000,\n \"concurrency\": 8,\n \"max_unknown_candidates\": 500\n },\n \"publication_ids\": [],\n \"keywords\": [],\n \"categories\": [],\n \"category_subject\": \"publication_vertical\",\n \"unknown_category_policy\": \"report_partial\",\n \"recall_terms\": [],\n \"published_from\": \"2023-11-07T05:31:56Z\",\n \"published_until\": \"2023-11-07T05:31:56Z\",\n \"include_undated\": true,\n \"evidence_surfaces\": [\n \"canonical_text\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"status": "queued",
"scanned_rows": 1,
"matched_candidates": 1,
"completed_candidates": 1,
"pending_candidates": 1,
"unknown_rows": 1,
"scan_complete": true,
"coverage": {},
"source_boundary": {
"source_table": "<string>",
"snapshot_id": 123,
"snapshot_committed_at": "2023-11-07T05:31:56Z"
},
"captured_at": "2023-11-07T05:31:56Z",
"reasons": [],
"results": []
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}