Developers

Cited answers in one API call.

The same retrieval and models as the Prism app, over REST. Send a question, get back text, citations with quotes and a count of unsupported claims.

Uptime, 90 days

99.98%

Regions

US, EU, CA

SDKs

4

200POST /v1/answers

412 ms

{
  "id": "ans_01J9ZQ4M7R",
  "model": "prism-2",
  "text": "Refunds moved from 14 to 30 days in March [1].",
  "citations": [
    {
      "index": 1,
      "title": "Refund policy v3",
      "source": "wiki",
      "quote": "Customers may request a refund within 30 days"
    }
  ],
  "unsupported_claims": 0,
  "usage": { "input_tokens": 3182, "output_tokens": 96 }
}

Quickstart

Your first answer in three steps.

  1. 1

    Create a key

    In the dashboard, open Settings → API keys. Free workspaces get test keys with 100k tokens a month. Keep keys on the server.

    Terminal

    export PRISM_API_KEY="pk_test_your_key_here"
  2. 2

    Ask a question

    Point sources at your workspace, the web or both. Every answer comes back with citations and quotes.

    curl https://api.prism.example/v1/answers \
      -H "Authorization: Bearer $PRISM_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "prism-2",
        "question": "What changed in our refund policy this year?",
        "sources": ["workspace", "web"]
      }'
  3. 3

    Stream it

    Set "stream": true to receive server-sent events: source, text and a final done with usage.

    curl -N https://api.prism.example/v1/answers \
      -H "Authorization: Bearer $PRISM_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"model": "prism-2-flash", "question": "Summarise this week in support", "stream": true}'

Reference

Endpoints

Base URL https://api.prism.example. JSON in, JSON out, versioned in the path. Breaking changes get a new version and twelve months of overlap.

  • POST/v1/answersAsk a question, get a cited answer
  • POST/v1/searchRanked passages, no generation
  • POST/v1/documentsAdd or update a document in your index
  • GET/v1/documents/{id}A document and its sync status
  • DELETE/v1/documents/{id}Remove a document from the index
  • POST/v1/briefsSchedule a recurring question
  • POST/v1/embeddingsVectors from prism-embed-1
  • GET/v1/usageToken usage by key and day

SDKs

Official libraries, typed and tested.

Retries with backoff, streaming helpers and pagination built in. Open source under the MIT license.

  • JavaScriptv3.2

    Node 20+, Deno, Bun and edge runtimes. Full TypeScript types.

    npm i @prismlabs/sdk
  • Pythonv3.1

    Python 3.9+, sync and async clients, Pydantic models.

    pip install prismlabs
  • Gov1.4

    Context-aware, zero dependencies beyond the standard library.

    go get prism.example/go
  • RubyBeta

    Ruby 3.2+, with a Rails generator for webhooks.

    gem install prismlabs

Limits

Rate limits

Limits apply per workspace. Every response carries x-ratelimit-remaining and x-ratelimit-reset; a 429 includes retry-after. The SDKs back off for you.

Plan Requests / min Tokens / min Concurrent streams
Free2040,0002
Team6002,000,00050
EnterpriseCustomCustomCustom

Need more? Ask for a limit increase. Most are approved the same day.

Ship cited answers this week.

Test keys are free. Production keys come with every Team plan, including 1M tokens a month.