curl --request POST \
--url https://api.nephia.cc/v1/analyses \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"items": [
{
"id": "<string>",
"title": "<string>",
"body": "<string>",
"meta": {}
}
],
"watch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"since": "2023-11-07T05:31:56Z",
"limit": 100,
"instruction": "<string>",
"schema": {},
"buckets": [
{
"id": "<string>",
"label": "<string>",
"rule": "<string>"
}
],
"question": "<string>"
}
'import requests
url = "https://api.nephia.cc/v1/analyses"
payload = {
"items": [
{
"id": "<string>",
"title": "<string>",
"body": "<string>",
"meta": {}
}
],
"watch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"since": "2023-11-07T05:31:56Z",
"limit": 100,
"instruction": "<string>",
"schema": {},
"buckets": [
{
"id": "<string>",
"label": "<string>",
"rule": "<string>"
}
],
"question": "<string>"
}
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({
items: [
{id: '<string>', title: '<string>', body: JSON.stringify('<string>'), meta: {}}
],
watch_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
since: '2023-11-07T05:31:56Z',
limit: 100,
instruction: '<string>',
schema: {},
buckets: [{id: '<string>', label: '<string>', rule: '<string>'}],
question: '<string>'
})
};
fetch('https://api.nephia.cc/v1/analyses', 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.nephia.cc/v1/analyses",
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([
'items' => [
[
'id' => '<string>',
'title' => '<string>',
'body' => '<string>',
'meta' => [
]
]
],
'watch_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'since' => '2023-11-07T05:31:56Z',
'limit' => 100,
'instruction' => '<string>',
'schema' => [
],
'buckets' => [
[
'id' => '<string>',
'label' => '<string>',
'rule' => '<string>'
]
],
'question' => '<string>'
]),
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.nephia.cc/v1/analyses"
payload := strings.NewReader("{\n \"items\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"meta\": {}\n }\n ],\n \"watch_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"since\": \"2023-11-07T05:31:56Z\",\n \"limit\": 100,\n \"instruction\": \"<string>\",\n \"schema\": {},\n \"buckets\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"rule\": \"<string>\"\n }\n ],\n \"question\": \"<string>\"\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.nephia.cc/v1/analyses")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"meta\": {}\n }\n ],\n \"watch_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"since\": \"2023-11-07T05:31:56Z\",\n \"limit\": 100,\n \"instruction\": \"<string>\",\n \"schema\": {},\n \"buckets\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"rule\": \"<string>\"\n }\n ],\n \"question\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nephia.cc/v1/analyses")
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 \"items\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"meta\": {}\n }\n ],\n \"watch_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"since\": \"2023-11-07T05:31:56Z\",\n \"limit\": 100,\n \"instruction\": \"<string>\",\n \"schema\": {},\n \"buckets\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"rule\": \"<string>\"\n }\n ],\n \"question\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"meta": {
"kind": "<string>",
"item_count": 123,
"batches": 123,
"credits_used": 123,
"model": "<string>"
},
"data": {
"groups": [
{
"title": "<string>",
"item_ids": [
"<string>"
],
"rationale": "<string>",
"flag": "<string>",
"tone": "<string>"
}
],
"verdicts": [
{
"item_id": "<string>",
"bucket_id": "<string>",
"confidence": 123,
"rationale": "<string>",
"sentiment": "<string>"
}
],
"outputs": [
{
"item_id": "<string>",
"output": {}
}
],
"text": "<string>"
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "Rate limit exceeded",
"code": "TOO_MANY_REQUESTS"
}{
"error": "<string>",
"code": "<string>"
}Run an AI pass over items
Runs one of four passes over up to 200 items: group them by a plain-language instruction, classify them into buckets you define, run an agent step (your instruction plus your schema, answered per item), or summarise the set.
Items come from items inline, or from watch_id — the recent events of a watch you own.
Costs 1 credit per 50 items for group, classify and summarise, and 1 credit per 25 items for agent — the agent’s output is generated text per field, not a single verdict. meta.credits_used reports what was actually charged: a batch the provider could not answer is not billed.
curl --request POST \
--url https://api.nephia.cc/v1/analyses \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"items": [
{
"id": "<string>",
"title": "<string>",
"body": "<string>",
"meta": {}
}
],
"watch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"since": "2023-11-07T05:31:56Z",
"limit": 100,
"instruction": "<string>",
"schema": {},
"buckets": [
{
"id": "<string>",
"label": "<string>",
"rule": "<string>"
}
],
"question": "<string>"
}
'import requests
url = "https://api.nephia.cc/v1/analyses"
payload = {
"items": [
{
"id": "<string>",
"title": "<string>",
"body": "<string>",
"meta": {}
}
],
"watch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"since": "2023-11-07T05:31:56Z",
"limit": 100,
"instruction": "<string>",
"schema": {},
"buckets": [
{
"id": "<string>",
"label": "<string>",
"rule": "<string>"
}
],
"question": "<string>"
}
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({
items: [
{id: '<string>', title: '<string>', body: JSON.stringify('<string>'), meta: {}}
],
watch_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
since: '2023-11-07T05:31:56Z',
limit: 100,
instruction: '<string>',
schema: {},
buckets: [{id: '<string>', label: '<string>', rule: '<string>'}],
question: '<string>'
})
};
fetch('https://api.nephia.cc/v1/analyses', 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.nephia.cc/v1/analyses",
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([
'items' => [
[
'id' => '<string>',
'title' => '<string>',
'body' => '<string>',
'meta' => [
]
]
],
'watch_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'since' => '2023-11-07T05:31:56Z',
'limit' => 100,
'instruction' => '<string>',
'schema' => [
],
'buckets' => [
[
'id' => '<string>',
'label' => '<string>',
'rule' => '<string>'
]
],
'question' => '<string>'
]),
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.nephia.cc/v1/analyses"
payload := strings.NewReader("{\n \"items\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"meta\": {}\n }\n ],\n \"watch_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"since\": \"2023-11-07T05:31:56Z\",\n \"limit\": 100,\n \"instruction\": \"<string>\",\n \"schema\": {},\n \"buckets\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"rule\": \"<string>\"\n }\n ],\n \"question\": \"<string>\"\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.nephia.cc/v1/analyses")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"meta\": {}\n }\n ],\n \"watch_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"since\": \"2023-11-07T05:31:56Z\",\n \"limit\": 100,\n \"instruction\": \"<string>\",\n \"schema\": {},\n \"buckets\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"rule\": \"<string>\"\n }\n ],\n \"question\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nephia.cc/v1/analyses")
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 \"items\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"meta\": {}\n }\n ],\n \"watch_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"since\": \"2023-11-07T05:31:56Z\",\n \"limit\": 100,\n \"instruction\": \"<string>\",\n \"schema\": {},\n \"buckets\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"rule\": \"<string>\"\n }\n ],\n \"question\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"meta": {
"kind": "<string>",
"item_count": 123,
"batches": 123,
"credits_used": 123,
"model": "<string>"
},
"data": {
"groups": [
{
"title": "<string>",
"item_ids": [
"<string>"
],
"rationale": "<string>",
"flag": "<string>",
"tone": "<string>"
}
],
"verdicts": [
{
"item_id": "<string>",
"bucket_id": "<string>",
"confidence": 123,
"rationale": "<string>",
"sentiment": "<string>"
}
],
"outputs": [
{
"item_id": "<string>",
"output": {}
}
],
"text": "<string>"
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "Rate limit exceeded",
"code": "TOO_MANY_REQUESTS"
}{
"error": "<string>",
"code": "<string>"
}Authorizations
API key created from the Nephia dashboard for your Account.
Headers
Unique key (e.g. UUID) making this POST safe to retry for 24 hours. Replays return the original response with an Idempotency-Replayed: true header; reusing a key with a different body returns 422.
255Body
group, classify, agent, summarise 1 - 200 elementsShow child attributes
Show child attributes
1 <= x <= 2001 - 800Show child attributes
Show child attributes
1 - 20 elementsShow child attributes
Show child attributes
1 - 500Was this page helpful?