Preview multi-provider web research
curl --request POST \
--url https://api.paywithlocus.com/api/wrapped/credits/router/web-research/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"maxResults": 10,
"maxProviders": 7,
"recencyDays": 183,
"country": "<string>",
"includeDomains": [
"<string>"
],
"excludeDomains": [
"<string>"
],
"includeImages": true,
"providers": [
"<string>"
],
"rails": [],
"maxCredits": "<string>",
"externalUserId": "<string>",
"attribution": {}
}
'import requests
url = "https://api.paywithlocus.com/api/wrapped/credits/router/web-research/preview"
payload = {
"query": "<string>",
"maxResults": 10,
"maxProviders": 7,
"recencyDays": 183,
"country": "<string>",
"includeDomains": ["<string>"],
"excludeDomains": ["<string>"],
"includeImages": True,
"providers": ["<string>"],
"rails": [],
"maxCredits": "<string>",
"externalUserId": "<string>",
"attribution": {}
}
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({
query: '<string>',
maxResults: 10,
maxProviders: 7,
recencyDays: 183,
country: '<string>',
includeDomains: ['<string>'],
excludeDomains: ['<string>'],
includeImages: true,
providers: ['<string>'],
rails: [],
maxCredits: '<string>',
externalUserId: '<string>',
attribution: {}
})
};
fetch('https://api.paywithlocus.com/api/wrapped/credits/router/web-research/preview', 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.paywithlocus.com/api/wrapped/credits/router/web-research/preview",
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([
'query' => '<string>',
'maxResults' => 10,
'maxProviders' => 7,
'recencyDays' => 183,
'country' => '<string>',
'includeDomains' => [
'<string>'
],
'excludeDomains' => [
'<string>'
],
'includeImages' => true,
'providers' => [
'<string>'
],
'rails' => [
],
'maxCredits' => '<string>',
'externalUserId' => '<string>',
'attribution' => [
]
]),
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://api.paywithlocus.com/api/wrapped/credits/router/web-research/preview"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"maxResults\": 10,\n \"maxProviders\": 7,\n \"recencyDays\": 183,\n \"country\": \"<string>\",\n \"includeDomains\": [\n \"<string>\"\n ],\n \"excludeDomains\": [\n \"<string>\"\n ],\n \"includeImages\": true,\n \"providers\": [\n \"<string>\"\n ],\n \"rails\": [],\n \"maxCredits\": \"<string>\",\n \"externalUserId\": \"<string>\",\n \"attribution\": {}\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://api.paywithlocus.com/api/wrapped/credits/router/web-research/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"maxResults\": 10,\n \"maxProviders\": 7,\n \"recencyDays\": 183,\n \"country\": \"<string>\",\n \"includeDomains\": [\n \"<string>\"\n ],\n \"excludeDomains\": [\n \"<string>\"\n ],\n \"includeImages\": true,\n \"providers\": [\n \"<string>\"\n ],\n \"rails\": [],\n \"maxCredits\": \"<string>\",\n \"externalUserId\": \"<string>\",\n \"attribution\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paywithlocus.com/api/wrapped/credits/router/web-research/preview")
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 \"query\": \"<string>\",\n \"maxResults\": 10,\n \"maxProviders\": 7,\n \"recencyDays\": 183,\n \"country\": \"<string>\",\n \"includeDomains\": [\n \"<string>\"\n ],\n \"excludeDomains\": [\n \"<string>\"\n ],\n \"includeImages\": true,\n \"providers\": [\n \"<string>\"\n ],\n \"rails\": [],\n \"maxCredits\": \"<string>\",\n \"externalUserId\": \"<string>\",\n \"attribution\": {}\n}"
response = http.request(request)
puts response.read_body{}Capability routing
Preview multi-provider web research
Plans eligible providers and returns the current tenant-aware estimate without calling a provider or burning credits.
POST
/
wrapped
/
credits
/
router
/
web-research
/
preview
Preview multi-provider web research
curl --request POST \
--url https://api.paywithlocus.com/api/wrapped/credits/router/web-research/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"maxResults": 10,
"maxProviders": 7,
"recencyDays": 183,
"country": "<string>",
"includeDomains": [
"<string>"
],
"excludeDomains": [
"<string>"
],
"includeImages": true,
"providers": [
"<string>"
],
"rails": [],
"maxCredits": "<string>",
"externalUserId": "<string>",
"attribution": {}
}
'import requests
url = "https://api.paywithlocus.com/api/wrapped/credits/router/web-research/preview"
payload = {
"query": "<string>",
"maxResults": 10,
"maxProviders": 7,
"recencyDays": 183,
"country": "<string>",
"includeDomains": ["<string>"],
"excludeDomains": ["<string>"],
"includeImages": True,
"providers": ["<string>"],
"rails": [],
"maxCredits": "<string>",
"externalUserId": "<string>",
"attribution": {}
}
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({
query: '<string>',
maxResults: 10,
maxProviders: 7,
recencyDays: 183,
country: '<string>',
includeDomains: ['<string>'],
excludeDomains: ['<string>'],
includeImages: true,
providers: ['<string>'],
rails: [],
maxCredits: '<string>',
externalUserId: '<string>',
attribution: {}
})
};
fetch('https://api.paywithlocus.com/api/wrapped/credits/router/web-research/preview', 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.paywithlocus.com/api/wrapped/credits/router/web-research/preview",
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([
'query' => '<string>',
'maxResults' => 10,
'maxProviders' => 7,
'recencyDays' => 183,
'country' => '<string>',
'includeDomains' => [
'<string>'
],
'excludeDomains' => [
'<string>'
],
'includeImages' => true,
'providers' => [
'<string>'
],
'rails' => [
],
'maxCredits' => '<string>',
'externalUserId' => '<string>',
'attribution' => [
]
]),
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://api.paywithlocus.com/api/wrapped/credits/router/web-research/preview"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"maxResults\": 10,\n \"maxProviders\": 7,\n \"recencyDays\": 183,\n \"country\": \"<string>\",\n \"includeDomains\": [\n \"<string>\"\n ],\n \"excludeDomains\": [\n \"<string>\"\n ],\n \"includeImages\": true,\n \"providers\": [\n \"<string>\"\n ],\n \"rails\": [],\n \"maxCredits\": \"<string>\",\n \"externalUserId\": \"<string>\",\n \"attribution\": {}\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://api.paywithlocus.com/api/wrapped/credits/router/web-research/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"maxResults\": 10,\n \"maxProviders\": 7,\n \"recencyDays\": 183,\n \"country\": \"<string>\",\n \"includeDomains\": [\n \"<string>\"\n ],\n \"excludeDomains\": [\n \"<string>\"\n ],\n \"includeImages\": true,\n \"providers\": [\n \"<string>\"\n ],\n \"rails\": [],\n \"maxCredits\": \"<string>\",\n \"externalUserId\": \"<string>\",\n \"attribution\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paywithlocus.com/api/wrapped/credits/router/web-research/preview")
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 \"query\": \"<string>\",\n \"maxResults\": 10,\n \"maxProviders\": 7,\n \"recencyDays\": 183,\n \"country\": \"<string>\",\n \"includeDomains\": [\n \"<string>\"\n ],\n \"excludeDomains\": [\n \"<string>\"\n ],\n \"includeImages\": true,\n \"providers\": [\n \"<string>\"\n ],\n \"rails\": [],\n \"maxCredits\": \"<string>\",\n \"externalUserId\": \"<string>\",\n \"attribution\": {}\n}"
response = http.request(request)
puts response.read_body{}Authorizations
secretKeyendUserTokenagentConnection
Tenant secret key (lcr_…). Server-side only.
Headers
Required only when the end-user JWT carries sid. Send the original high-entropy session value; sid is its SHA-256 fingerprint. Ignored for secret-key authentication.
Required string length:
16 - 128Pattern:
^[A-Za-z0-9][A-Za-z0-9._:-]{15,127}$Body
application/json
Required string length:
1 - 400Available options:
fast, balanced, comprehensive Required range:
1 <= x <= 20Required range:
1 <= x <= 13Legacy v1 selector. Accepted for compatibility; prefer mode.
Available options:
balanced, cost, quality, speed Available options:
general, news Required range:
1 <= x <= 365Pattern:
^[A-Za-z]{2}$Maximum array length:
20Maximum array length:
20Maximum array length:
13Legacy v1 payment-path allowlist. Accepted but ignored because Locus chooses each provider payment path internally.
Available options:
api-key, mpp, x402 Non-negative exact decimal string with at most six fractional digits. Endpoint-specific positivity and amount limits still apply.
Pattern:
^\d+(?:\.\d{1,6})?$Response
Free routing plan and current estimate
The response is of type object.