Start a batch
curl --request POST \
--url https://preuve.ai/api/agent/analysis-batches \
--header 'Content-Type: application/json' \
--header 'x-preuve-key: <api-key>' \
--data '
{
"clientRunId": "<string>",
"items": [
{
"clientRunId": "my-run-001",
"scanType": "free",
"idea": "A scheduling assistant that helps independent coffee shops coordinate weekly local supplier orders with lower waste.",
"targetMarket": "Independent coffee shops",
"targetCountry": "US",
"enrichmentMode": "core",
"publish": true
}
],
"name": "<string>"
}
'import requests
url = "https://preuve.ai/api/agent/analysis-batches"
payload = {
"clientRunId": "<string>",
"items": [
{
"clientRunId": "my-run-001",
"scanType": "free",
"idea": "A scheduling assistant that helps independent coffee shops coordinate weekly local supplier orders with lower waste.",
"targetMarket": "Independent coffee shops",
"targetCountry": "US",
"enrichmentMode": "core",
"publish": True
}
],
"name": "<string>"
}
headers = {
"x-preuve-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-preuve-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
clientRunId: '<string>',
items: [
{
clientRunId: 'my-run-001',
scanType: 'free',
idea: 'A scheduling assistant that helps independent coffee shops coordinate weekly local supplier orders with lower waste.',
targetMarket: 'Independent coffee shops',
targetCountry: 'US',
enrichmentMode: 'core',
publish: true
}
],
name: '<string>'
})
};
fetch('https://preuve.ai/api/agent/analysis-batches', 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://preuve.ai/api/agent/analysis-batches",
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([
'clientRunId' => '<string>',
'items' => [
[
'clientRunId' => 'my-run-001',
'scanType' => 'free',
'idea' => 'A scheduling assistant that helps independent coffee shops coordinate weekly local supplier orders with lower waste.',
'targetMarket' => 'Independent coffee shops',
'targetCountry' => 'US',
'enrichmentMode' => 'core',
'publish' => true
]
],
'name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-preuve-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://preuve.ai/api/agent/analysis-batches"
payload := strings.NewReader("{\n \"clientRunId\": \"<string>\",\n \"items\": [\n {\n \"clientRunId\": \"my-run-001\",\n \"scanType\": \"free\",\n \"idea\": \"A scheduling assistant that helps independent coffee shops coordinate weekly local supplier orders with lower waste.\",\n \"targetMarket\": \"Independent coffee shops\",\n \"targetCountry\": \"US\",\n \"enrichmentMode\": \"core\",\n \"publish\": true\n }\n ],\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-preuve-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://preuve.ai/api/agent/analysis-batches")
.header("x-preuve-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"clientRunId\": \"<string>\",\n \"items\": [\n {\n \"clientRunId\": \"my-run-001\",\n \"scanType\": \"free\",\n \"idea\": \"A scheduling assistant that helps independent coffee shops coordinate weekly local supplier orders with lower waste.\",\n \"targetMarket\": \"Independent coffee shops\",\n \"targetCountry\": \"US\",\n \"enrichmentMode\": \"core\",\n \"publish\": true\n }\n ],\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://preuve.ai/api/agent/analysis-batches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-preuve-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clientRunId\": \"<string>\",\n \"items\": [\n {\n \"clientRunId\": \"my-run-001\",\n \"scanType\": \"free\",\n \"idea\": \"A scheduling assistant that helps independent coffee shops coordinate weekly local supplier orders with lower waste.\",\n \"targetMarket\": \"Independent coffee shops\",\n \"targetCountry\": \"US\",\n \"enrichmentMode\": \"core\",\n \"publish\": true\n }\n ],\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clientRunId": "<string>",
"name": "<string>",
"status": "<string>",
"counts": {},
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reportId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clientRunId": "<string>",
"readyForExport": true,
"enrichment": {
"required": [
"<string>"
],
"completed": [
"<string>"
]
},
"modules": {
"proofOfDemand": {},
"founderFit": {},
"playbook": {},
"trends": {}
},
"reportUrl": "<string>",
"shareUrl": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"details": "<unknown>"
}Batches
Start a batch
Create up to 10 analysis runs in one batch. Idempotent on the batch clientRunId. Each item needs its own unique clientRunId and explicit scanType (mix free and deep intentionally).
POST
/
api
/
agent
/
analysis-batches
Start a batch
curl --request POST \
--url https://preuve.ai/api/agent/analysis-batches \
--header 'Content-Type: application/json' \
--header 'x-preuve-key: <api-key>' \
--data '
{
"clientRunId": "<string>",
"items": [
{
"clientRunId": "my-run-001",
"scanType": "free",
"idea": "A scheduling assistant that helps independent coffee shops coordinate weekly local supplier orders with lower waste.",
"targetMarket": "Independent coffee shops",
"targetCountry": "US",
"enrichmentMode": "core",
"publish": true
}
],
"name": "<string>"
}
'import requests
url = "https://preuve.ai/api/agent/analysis-batches"
payload = {
"clientRunId": "<string>",
"items": [
{
"clientRunId": "my-run-001",
"scanType": "free",
"idea": "A scheduling assistant that helps independent coffee shops coordinate weekly local supplier orders with lower waste.",
"targetMarket": "Independent coffee shops",
"targetCountry": "US",
"enrichmentMode": "core",
"publish": True
}
],
"name": "<string>"
}
headers = {
"x-preuve-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-preuve-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
clientRunId: '<string>',
items: [
{
clientRunId: 'my-run-001',
scanType: 'free',
idea: 'A scheduling assistant that helps independent coffee shops coordinate weekly local supplier orders with lower waste.',
targetMarket: 'Independent coffee shops',
targetCountry: 'US',
enrichmentMode: 'core',
publish: true
}
],
name: '<string>'
})
};
fetch('https://preuve.ai/api/agent/analysis-batches', 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://preuve.ai/api/agent/analysis-batches",
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([
'clientRunId' => '<string>',
'items' => [
[
'clientRunId' => 'my-run-001',
'scanType' => 'free',
'idea' => 'A scheduling assistant that helps independent coffee shops coordinate weekly local supplier orders with lower waste.',
'targetMarket' => 'Independent coffee shops',
'targetCountry' => 'US',
'enrichmentMode' => 'core',
'publish' => true
]
],
'name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-preuve-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://preuve.ai/api/agent/analysis-batches"
payload := strings.NewReader("{\n \"clientRunId\": \"<string>\",\n \"items\": [\n {\n \"clientRunId\": \"my-run-001\",\n \"scanType\": \"free\",\n \"idea\": \"A scheduling assistant that helps independent coffee shops coordinate weekly local supplier orders with lower waste.\",\n \"targetMarket\": \"Independent coffee shops\",\n \"targetCountry\": \"US\",\n \"enrichmentMode\": \"core\",\n \"publish\": true\n }\n ],\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-preuve-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://preuve.ai/api/agent/analysis-batches")
.header("x-preuve-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"clientRunId\": \"<string>\",\n \"items\": [\n {\n \"clientRunId\": \"my-run-001\",\n \"scanType\": \"free\",\n \"idea\": \"A scheduling assistant that helps independent coffee shops coordinate weekly local supplier orders with lower waste.\",\n \"targetMarket\": \"Independent coffee shops\",\n \"targetCountry\": \"US\",\n \"enrichmentMode\": \"core\",\n \"publish\": true\n }\n ],\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://preuve.ai/api/agent/analysis-batches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-preuve-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clientRunId\": \"<string>\",\n \"items\": [\n {\n \"clientRunId\": \"my-run-001\",\n \"scanType\": \"free\",\n \"idea\": \"A scheduling assistant that helps independent coffee shops coordinate weekly local supplier orders with lower waste.\",\n \"targetMarket\": \"Independent coffee shops\",\n \"targetCountry\": \"US\",\n \"enrichmentMode\": \"core\",\n \"publish\": true\n }\n ],\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clientRunId": "<string>",
"name": "<string>",
"status": "<string>",
"counts": {},
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reportId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clientRunId": "<string>",
"readyForExport": true,
"enrichment": {
"required": [
"<string>"
],
"completed": [
"<string>"
]
},
"modules": {
"proofOfDemand": {},
"founderFit": {},
"playbook": {},
"trends": {}
},
"reportUrl": "<string>",
"shareUrl": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"details": "<unknown>"
}Authorizations
API key id. Requests are additionally signed with x-preuve-timestamp, x-preuve-nonce, and x-preuve-signature (HMAC-SHA256) - see the Authentication guide.
Body
application/json
Idempotency id for the whole batch.
Required array length:
1 - 10 elementsShow child attributes
Show child attributes
Default scanType applied to every item; each item may override.
Available options:
free, deep Available options:
core, none ⌘I