QDT · Q.Mind Developer API

Marketing intelligence,
inside your product.

Use the same canonical Q.Mind/Asimov reasoning available in the portal, with account-isolated context, governed analysis, progress, downloadable artifacts, and cryptographic answer integrity.

01 · Quick start

One asynchronous response interface

Create a key in Q.Mind → Account → Developer API. Send a question to POST /api/v1/responses, then poll the returned Location until the status is terminal.

# Keep the key in your server environment.
export QMIND_API_KEY="qmind_live_…"

curl https://qmind.qdt.ai/api/v1/responses \
  -H "Authorization: Bearer $QMIND_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: northstar-growth-001" \
  -d '{
    "input": "For fictional Northstar Laundry, should growth prioritize penetration or premiumization?",
    "capability": "cmo-counsel"
  }'
{
  "id": "9a4d…",
  "object": "qmind.response",
  "status": "queued",
  "model": "qmind-asimov",
  "conversation_id": "b71e…",
  "output_text": null,
  "links": { "self": "/api/v1/responses/9a4d…" }
}
02 · Authentication

Keys belong to one account

CREATE

Name the integration

Sign in as an account owner or developer, open Account, and create a server-side key. The secret is shown once.

USE

Bearer authentication

Send Authorization: Bearer qmind_live_…. Keys cannot access another account or Q.Mind operator routes.

REVOKE

Immediate shutdown

Revoke a key from Account. Q.Mind stores only a SHA-256 digest, never the recoverable secret.

Server-side only

Do not place a Q.Mind key in browser JavaScript, mobile binaries, public repositories, screenshots, or client logs.

03 · Responses

Endpoints

POST/api/v1/responsesCreate work

Creates a natural Q.Mind answer or a governed long-running analysis. Returns 202; an exact retry with the same Idempotency-Key returns the original response, while a different payload returns 409.

GET/api/v1/responses/{id}Poll work

Returns queued, running, or a terminal state. Completed responses include output_text, integrity metadata, and artifact links.

POST/api/v1/responses/{id}/cancelStop work

Cancels a queued or running API response. Completed work is immutable.

GET/api/v1/artifacts/{id}/contentDownload file

Downloads a customer-facing PDF, PowerPoint, creative set, or campaign calendar referenced by the response, using the same Bearer key.

Request fields

FieldRequiredPurpose
inputYesThe question or work request, up to 12,000 characters.
conversation_idNoContinue a prior API conversation with its bounded context.
project_idNoAttach work to an existing account project. A project is created automatically when omitted.
processing_modeNoauto (default), conversation, or analysis. Use analysis for deterministic governed work.
capabilityNoA routing preference. Default: cmo-counsel.
04 · Continuity

Keep the conversation, not the prompt plumbing

Save the returned conversation_id and send it on the next call. Q.Mind retrieves the account-scoped thread, project facts, prior answers, and governed evidence without asking your application to rebuild the prompt.

const followUp = await fetch(`${base}/responses`, {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.QMIND_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID()
  },
  body: JSON.stringify({
    input: "What evidence would falsify your first recommendation?",
    conversation_id: first.conversation_id
  })
});
05 · Analysis + files

Long work stays observable

Set processing_mode to analysis for deterministic governed work, or use auto for intent-based routing. Poll the same response; its progress object describes the current stage and elapsed work.

{
  "input": "Diagnose fictional Northstar Pet Nutrition. Return a PDF and editable PowerPoint.",
  "capability": "growth-diagnosis",
  "processing_mode": "analysis"
}

The progress fields are stage, label, detail, optional portfolio fields brand/current/total, and startedAt/updatedAt. Treat stage values as extensible.

Artifact types are qmind-report-pdf, qmind-report-pptx, qmind-creative-set, and qmind-campaign-calendar. Download URLs are stable authenticated paths, not expiring signed links; they remain valid while the artifact and authorized key remain active.

The response records canonical_answer_sha256 and canonical_integrity_verified; Q.Mind fails closed if its canonical answer changes in transit.

06 · Operations

Errors, retries, and limits

StatusMeaningAction
400Invalid request or idempotency keyFix the named param.
401Missing, invalid, expired, or revoked keyUse an active Bearer key.
403Key lacks responses:read or responses:writeCreate or use a key with the required scope.
404Resource is absent or outside the key's accountCheck the ID and account.
409Context mismatch or invalid stateDo not mix projects and conversations; poll before cancellation.
413JSON request body exceeds 1 MBReduce the request body.
42960 requests per minute per keyHonor Retry-After.
500Unexpected API failureRetry safely with the same Idempotency-Key and retain X-Request-Id.
Polling and terminal states

Every authenticated request—including polling and downloads—counts toward 60 requests per minute. Public API statuses are queued, running, completed, failed, blocked, and cancelled; public jobs do not enter waiting_approval. A blocked response needs a corrected condition and a new request. Completion webhooks and a published whole-run maximum are not currently available.

{
  "error": {
    "type": "invalid_request_error",
    "code": "conversation_not_found",
    "message": "The conversation does not exist in this account.",
    "param": "conversation_id"
  }
}
07 · Security

Designed around account isolation

BOUNDARY

Tenant-scoped

Every key resolves to one Q.Mind tenant before projects, conversations, tasks, messages, or files are queried.

SECRET

Digest-only storage

Plaintext keys are shown once. Q.Mind authenticates against a SHA-256 digest and records use and revocation.

OUTPUT

Canonical integrity

Written answers carry an end-to-end SHA-256 receipt from canonical Asimov through the Q.Mind worker.