Skip to main content
ManticScore exposes its full AI pipeline through a REST API at https://api.manticscore.com. This guide walks you through the complete flow: exchanging your Clerk JWT for a session token, loading your profile with a single bootstrap call, submitting a market research job, and streaming the results as they come in. By the end you’ll have a working script you can adapt for any product idea.
You need a ManticScore account and a Clerk JWT before starting. See Authentication for how to obtain your JWT from the Clerk dashboard or SDK.

Prerequisites

  • A ManticScore account
  • Your Clerk JWT (retrieved from the Clerk dashboard or your client SDK)

Complete walkthrough

1

Exchange your Clerk JWT for a session token

Every request to the ManticScore API uses a short-lived session token, not your raw Clerk JWT. Send your Clerk JWT to POST /auth/session to receive a token.
Response:
Save the token value. You’ll pass it as a Bearer token on every subsequent request. The token is valid for 30 minutes — call POST /auth/session again with your Clerk JWT to refresh it.
POST /auth/session only accepts a Clerk JWT, not another session token. If your token expires mid-session, re-authenticate with your original Clerk JWT.
2

Load your profile with the bootstrap call

Before starting any work, call GET /auth/bootstrap. This single endpoint returns your profile, subscription details, and connected secrets in one shot — use it to confirm you’re authenticated and to check your available credits.
Response:
Check credits_used vs credits_total before submitting research jobs. Market research costs 3 credits. Free accounts receive 20 credits per day, automatically reset every 24 hours.
3

Submit a market research job

Send a POST /projects/research request with your product idea. The API queues the job immediately and returns a job_id you’ll use to stream progress.
Request body:Response 202 — queued:
If ManticScore has seen a similar idea before, it may return 200 with "cache_action": "clone" and "status": "completed" — meaning results are already available and no streaming is needed.
4

Stream progress events

Connect to GET /research/{job_id}/events to receive real-time progress over NDJSON. Each line is a JSON object describing a stage, progress update, or final result.
Sample stream output:
Event types:
Parse on the event field and ignore any unknown event types — new event types may be added without breaking existing clients.

Complete Python example

Here is the full end-to-end script combining all four steps:
quickstart.py

Next steps

Authentication

Learn about session token TTLs, refreshing tokens, and error handling.

Market research

Explore the full research response schema and how to read results.

NDJSON streaming

Understand the streaming protocol and reconnection with cursors.

Credits

See how credits work and what each operation costs.