This reference covers public research operations supported by the current backend. Service forms supply tool-specific payloads; worker callback endpoints are not client APIs.
Request conventions
Use https://neurosnap.ai as the base URL and X-API-KEY for account authentication. URL-encode service titles and path components. Read both HTTP status and response body before interpreting a result; do not assume errors use the same shape as success responses.
POST is used for job submissions, duplication, and cancellation. Some existing sharing endpoints mutate state through GET; call those deliberately rather than treating every GET route as a harmless probe.
Discover services
| Endpoint | Method | Result |
|---|---|---|
/api/services |
GET | Catalog of service metadata and form definitions |
/api/jobs?exclude_subdata |
GET | Accessible personal history as job rows, newest first |
Job rows include Job ID, Service, Status, Start, End, Credits Used, Note, and organizational identifiers. Team visibility can affect which entries remain accessible. Use the returned names rather than assuming lowercase JSON keys.
Job timing
Job rows return Start and End as integer Unix timestamps in seconds, replacing the formatted Runtime field. Start == 0 means execution has not started; End == 0 means execution has not ended. Do not interpret zero as a date or subtract it from the other timestamp.
These fields appear in /api/jobs, /api/teams/jobs, and the jobs array returned by /api/pipelines/status/{id}. Team job history requires current team membership and the appropriate access.
For example, a completed job can include these fields:
{
"Job ID": "66aea7b235c83718af6161d5",
"Service": "PDBFixer",
"Status": "completed",
"Start": 1722722250,
"End": 1722722281
}
Its execution runtime is End - Start, or 31 seconds. For a running job, use the current Unix time in place of End. Pending jobs have no execution runtime yet. In JavaScript, Date.now() uses milliseconds: divide it by 1000 before subtracting these timestamps, or multiply a timestamp by 1000 when constructing a Date.
The REST job row does not include a Submitted field. Submission time is encoded in the first eight hexadecimal characters of Job ID. Subtract that submission time from Start to calculate the delay before execution; for a pending job, use the current time to report how long it has been waiting:
import time
def job_timing(job, now=None):
now = int(time.time()) if now is None else now
start, end = job["Start"], job["End"]
submitted = int(job["Job ID"][:8], 16)
runtime = max(0, (end or now) - start) if start else None
queue_delay = max(0, (start or now) - submitted)
return {"runtime_seconds": runtime, "queue_delay_seconds": queue_delay}
Use Status to distinguish pending, running, and terminal jobs; timestamps alone do not describe success or failure. The MCP interface retains a readable runtime alongside lowercase start and end fields in its job-list output. REST clients should calculate runtime from Start and End.
Submit and manage jobs
| Endpoint | Method | Contract |
|---|---|---|
/api/job/submit/{service} |
POST | Multipart form with exact field titles; success is a JSON job-ID string |
/api/job/status/{id} |
GET | JSON status string |
/api/job/data/{id} |
GET | Object containing config, in, and out; file lists contain filename/size rows |
/api/job/copy/{id} |
POST | Creates a new billable run from saved inputs and configuration |
/api/job/cancel/{id} |
POST | Requests cancellation; inspect the response and subsequent job status |
The optional note query parameter on submission supplies a recognizable descriptor. File fields require the format documented by their field type; complex molecule and sequence inputs are not arbitrary JSON strings.
Use the service page’s generated API example as a starting point and see the quickstart for multipart construction and bounded polling. Preserve the returned ID before continuing to another stage.
Download files
GET /api/job/file/{id}/{in-or-out}/{filename} checks access and returns an HTTP redirect to a temporary download URL. Use in or out and a filename from the listing. The temporary URL is itself sensitive.
Avoid forwarding the account API key to the storage host. Request the redirect without following it, then download separately:
from urllib.parse import quote, urlparse
filename = result["out"][0][0] # Choose the intended listed output.
response = requests.get(
f"{base}/api/job/file/{job_id}/out/{quote(filename, safe='')}",
headers=headers, allow_redirects=False, timeout=30,
)
response.raise_for_status()
if response.status_code != 307:
raise RuntimeError("Expected a temporary file redirect")
url = response.headers["Location"]
if urlparse(url).scheme != "https":
raise RuntimeError("Expected an HTTPS download URL")
download = requests.get(url, timeout=120) # No account headers.
download.raise_for_status()
Path("downloaded-result").write_bytes(download.content)
This snippet continues the quickstart’s Python context and buffers one file. For large trajectories, stream downloads to disk. Do not store the temporary URL as a permanent research identifier; preserve the job ID and downloaded file instead.
Sharing and access
The existing owner-only share controls use GET /api/job/share/set/{id} to create/replace a token and GET /api/job/share/delete/{id} to revoke it. Shared result routes accept a share query parameter where supported.
The server may report an inaccessible job as unknown. Do not interpret that response as evidence that the job never existed. Confirm the account, team, and share context.
Pipelines and projects
Pipeline routes include POST /api/pipelines/validate, POST /api/pipelines/submit, GET /api/pipelines/status/{id}, and GET /api/pipelines/list. A status response contains pipeline, jobs, and errors. The graph and upload payload is builder-specific; do not substitute the ordinary job multipart schema. Use an exported builder configuration and inspect its request contract before custom integration.
Project routes include GET /api/job-projects and POST operations at /api/job-project/create, /api/job-project/update, /api/job-project/delete, and /api/job-project/assign. Visibility and ownership constraints still apply. Use projects and pipelines to understand the model before automating mutations.
Handle failures without duplicate execution
Check HTTP failures, then inspect known IDs. Retry read operations with a bounded policy; reconcile submissions before retrying writes. Requests can fail after a job has been created. Duplicate-job operations explicitly launch new computation.
The original API tutorial provides additional examples. For exact current fields, use catalog metadata and the service form.