curl --request POST \
--url https://seneca-research.fly.dev/v1/research \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"prompt": "<string>",
"panel": "<string>"
}
'import requests
url = "https://seneca-research.fly.dev/v1/research"
payload = {
"prompt": "<string>",
"panel": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({prompt: '<string>', panel: '<string>'})
};
fetch('https://seneca-research.fly.dev/v1/research', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"prompt": "<string>",
"credits_reserved": 123,
"created_at": "2023-11-07T05:31:56Z",
"progress": {
"total_models": 123,
"completed_models": 123,
"successful_models": 123,
"failed_models": 123
},
"object": "research.run",
"phase": "<string>",
"source": "<string>",
"panel": "<string>",
"credits_charged": 123,
"failure_code": "<string>",
"completed_at": "2023-11-07T05:31:56Z"
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"prompt": "<string>",
"credits_reserved": 123,
"created_at": "2023-11-07T05:31:56Z",
"progress": {
"total_models": 123,
"completed_models": 123,
"successful_models": 123,
"failed_models": 123
},
"object": "research.run",
"phase": "<string>",
"source": "<string>",
"panel": "<string>",
"credits_charged": 123,
"failure_code": "<string>",
"completed_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Create research
Accept a research question. A new run returns 202 and reserves the panel price. The same Idempotency-Key with the same prompt and panel returns 200 for 24 hours, sets Idempotent-Replayed: true, and does not reserve credits again.
curl --request POST \
--url https://seneca-research.fly.dev/v1/research \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"prompt": "<string>",
"panel": "<string>"
}
'import requests
url = "https://seneca-research.fly.dev/v1/research"
payload = {
"prompt": "<string>",
"panel": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({prompt: '<string>', panel: '<string>'})
};
fetch('https://seneca-research.fly.dev/v1/research', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"prompt": "<string>",
"credits_reserved": 123,
"created_at": "2023-11-07T05:31:56Z",
"progress": {
"total_models": 123,
"completed_models": 123,
"successful_models": 123,
"failed_models": 123
},
"object": "research.run",
"phase": "<string>",
"source": "<string>",
"panel": "<string>",
"credits_charged": 123,
"failure_code": "<string>",
"completed_at": "2023-11-07T05:31:56Z"
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"prompt": "<string>",
"credits_reserved": 123,
"created_at": "2023-11-07T05:31:56Z",
"progress": {
"total_models": 123,
"completed_models": 123,
"successful_models": 123,
"failed_models": 123
},
"object": "research.run",
"phase": "<string>",
"source": "<string>",
"panel": "<string>",
"credits_charged": 123,
"failure_code": "<string>",
"completed_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Authorizations
Workspace API key created while signed in on the Developers page. Send Authorization: Bearer seneca_sk_… A Clerk session token is not accepted.
Headers
Required. 1–255 characters: letters, numbers, or . _ : -. Reuse this exact value, with the same prompt and panel, to retry a request whose response was lost. A different prompt or panel with this value returns 409 idempotency_conflict. The key expires after 24 hours.
1 - 255^[A-Za-z0-9._:-]{1,255}$Body
The research question. The server trims surrounding whitespace.
Research depth. Canonical ids and server-owned prices: wide (15 credits, 10 curated models), consensus (45 credits, 40 curated models), seneca (100 credits, every production-eligible model). The server chooses the models. Extra fields, including a model list, are rejected.
Response
Idempotent replay of the original run. The response header Idempotent-Replayed is true. No second run is created and no second reserve is written.
queued, running, synthesizing, completed, partial, or failed.
Credits reserved when the run was accepted. This is the panel price and does not change if the run is later refunded.
Show child attributes
Show child attributes
"research.run"panel while models are still answering. Null while synthesizing or after the run finishes.
Canonical panel id: wide, consensus, or seneca. A stored Quick Pulse run still reports quick_pulse.
Null while the run is in progress. Equal to credits_reserved when a customer report is delivered, including a partial run that has a report. 0 after a verified technical failure with no customer report; that refund restores the reserve. failure_code does not change between a charged failure and a refunded one.
research_failed when status is failed. Null otherwise.