Phantom Helix

Resources

Phantom Agent / API v1

Run Phantom Agent from your code.

Use your Phantom Agent account and Credits to create text investigations from your own tools, check progress, and retrieve final reports.

Create an API keyOpenAPI 3.1 JSON

Quick start

Set two environment variables, then send one request. Investigations run in the background, so the response gives you an investigation ID and links for status and report checks.

bash

1
2
3
4
5
6
7
8
9
10
11
12
13
export PHANTOM_AGENT_API_KEY='pa_live_...'
export PHANTOM_AGENT_API_BASE_URL='https://phantomhelix.com'

curl --fail-with-body \
  -X POST "$PHANTOM_AGENT_API_BASE_URL/api/v1/phantom-agent/investigations" \
  -H "Authorization: Bearer $PHANTOM_AGENT_API_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: case-42-attempt-1' \
  --data '{
    "query": "Investigate the ownership and public-risk signals for Example Company.",
    "max_credits": 100,
    "client_reference": "case-42"
  }'

Authentication

Create a personal API key from your dashboard.

Send the key as a Bearer token with every request. A revoked key stops working at once, and the full key is shown only when you create it. Keep it in server-side code on a trusted server. Do not put it in browser code or a public repository.

http

1
Authorization: Bearer pa_live_...

Create an investigation

POST/api/v1/phantom-agent/investigations

Send a focused research question and the most Credits you approve for the run. The optional client reference can link the investigation to a record in your system.

query

string · required

The research question. Use 1 to 4,000 characters.

max_credits

integer · required

The most Credits this investigation may use. The minimum is 5.

client_reference

string · optional

Your own reference, up to 200 characters. Use it to match the investigation to a record in your system.

json

1
2
3
4
5
{
  "query": "Investigate the ownership and public-risk signals for Example Company.",
  "max_credits": 100,
  "client_reference": "case-42"
}

Give each create attempt an idempotency key. If a network request has an unclear result, retry the same body with the same key. This prevents duplicate work and duplicate Credit use.

json

1
2
3
4
5
6
7
8
{
  "id": "inv_...",
  "status": "queued",
  "client_reference": "case-42",
  "status_url": "/api/v1/phantom-agent/investigations/inv_...",
  "report_url": "/api/v1/phantom-agent/investigations/inv_.../report",
  "created_at": "2026-09-25T12:00:00.000Z"
}

Check investigation status

GET/api/v1/phantom-agent/investigations/{id}

Poll this endpoint until the status is completed, failed, or cancelled. Status can be queued, starting, running, completed, failed, or cancelled. The response also includes available timestamps.

bash

1
2
3
4
5
export INVESTIGATION_ID='inv_...'

curl --fail-with-body \
  "$PHANTOM_AGENT_API_BASE_URL/api/v1/phantom-agent/investigations/$INVESTIGATION_ID" \
  -H "Authorization: Bearer $PHANTOM_AGENT_API_KEY"

Get the report

GET/api/v1/phantom-agent/investigations/{id}/report

Request the report after the investigation is complete. The response includes structured sections, Markdown, citations, gaps, and warnings. If research is still active, the API returns REPORT_NOT_READY with Retry-After. Wait for that delay before the next request.

bash

1
2
3
curl --fail-with-body \
  "$PHANTOM_AGENT_API_BASE_URL/api/v1/phantom-agent/investigations/$INVESTIGATION_ID/report" \
  -H "Authorization: Bearer $PHANTOM_AGENT_API_KEY"

Check Credits

GET/api/v1/phantom-agent/credits

Read your available and reserved Credits before you start a run. This endpoint does not buy or add Credits.

bash

1
2
3
curl --fail-with-body \
  "$PHANTOM_AGENT_API_BASE_URL/api/v1/phantom-agent/credits" \
  -H "Authorization: Bearer $PHANTOM_AGENT_API_KEY"

Handle errors

Errors use one JSON shape and a stable code. Branch on error.code instead of the message, and keep X-Request-Id when you contact support.

json

1
2
3
4
5
6
7
{
  "error": {
    "code": "INSUFFICIENT_CREDITS",
    "message": "There are not enough available Credits for this request.",
    "request_id": "req_..."
  }
}

Retry only temporary errors. Follow Retry-After when it is present, and use a bounded delay when it is not.

Retry after a delay: REQUEST_IN_PROGRESS, RATE_LIMITED, REPORT_NOT_READY, DEPENDENCY_UNAVAILABLE, and CONCURRENCY_LIMIT_REACHED.

Fix the condition first: INVALID_REQUEST, INVALID_API_KEY, ACCESS_REQUIRED, INSUFFICIENT_CREDITS, IDEMPOTENCY_CONFLICT, and REPORT_UNAVAILABLE.

Phantom Helix

In silence, patterns emerge.

Investigation tools for professional teams that need to keep the sources, reasoning, and next steps together.

Phantom Agent

OverviewHow access worksRequest accessSign in

© 2026 Phantom Helix · Operated by Danny Jian · ABN 52 512 969 796

Built in Melbourne for professional investigation work.