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
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
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.
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.