Symbol Word Protocol - Transform Documents for AI Understanding
The Symbol Word Protocol (SWP) is a structured tagging system designed to make documents more understandable to AI systems. By adding semantic tags to your content, you help Large Language Models (LLMs) like ChatGPT, Claude, and other AI assistants process your documents with greater accuracy, consistency, and context awareness.
AI systems work best when they understand the structure and intent of content. SWP provides:
Recent platform enhancements expanding SWP capabilities for developers and enterprises:
pip install ideaphase) and JavaScript/TypeScript (npm install ideaphase) client libraries with full API coverageGET /api/health for component-level status monitoring and GET /api/v1/discovery for automatic endpoint catalog. No authentication requiredGET /docs redirects to this documentation portal for convenience. Use either /docs or /swp-docs to access these guidesThese tags are applied to every document, regardless of which framework you choose:
single-domain (Sector) or cross-domain (Sector A, Sector B). When a document spans two or more regulated areas, a merged @regulatory_standards line is added so no metadata signal is lostPublic, Internal, Confidential, or Restricted — plus a (PII) / (PHI) flag when personal or health data is found. Personal/health data forces at least Confidential; secrets or credentials escalate to RestrictedHigh, Medium, or Low — based on document substance and signal strength (deterministic, no AI guesswork)| Feature | Free Tier FREE | Pro Plan PRO |
|---|---|---|
| Single-file SWP tagging | Unlimited | Unlimited |
| Core SWP tags | All tags | All tags |
| Document proof generation | Yes | Yes |
| Batch processing (multi-file) | - | 180/month |
| Domain frameworks | - | All 7 frameworks |
| GPT Idea Builder | - | 180/month |
| Document Refinement | - | 180/month |
| SWP Playground (A/B evaluation) | - | Yes (10 platform GPT/month + BYO key) |
| Usage Dashboard | - | Yes |
| API Access (V1 + V2) | - | Yes (via API keys) |
| Webhook Notifications | - | Yes (HMAC-signed) |
| Agent-to-Agent Proof Sharing | - | Yes |
| Official SDKs (Python & JS) | Available (requires Pro API key) | |
SWP-tagged documents work seamlessly with AI assistants. Here's how to leverage them:
"I'm providing an SWP-tagged document. Please read the metadata tags at the top to understand the context, development phase, and priority before responding to my questions."
Include SWP-tagged requirements and specifications in your project. The AI will use the phase and priority tags to understand which features to prioritize.
Tag your notes and journal entries to create searchable, structured content. The @category and @status tags help you track progress on ideas over time.
The General framework applies standard SWP tags suitable for any document type. It's the default framework and is available to all users, including free tier.
@regulatory_scope tag is applied here too — for free. The General framework auto-scans your text for regulated sectors and reports single-domain (Sector) or cross-domain (Sector A, Sector B). If your document clearly spans two or more regulated areas, a merged @regulatory_standards line is added automatically. You do not need a Pro plan or a domain framework to get this safety signal.
Enable "Show Extended Tags" to access additional metadata options:
HIPAA/GDPR compliant tagging for medical documentation, clinical workflows, and healthcare technology
These 8 metadata tags (including the mandatory @regulatory_scope) are automatically applied when using the Healthcare framework:
ISO 13482 / IEC 61508 compliant tagging for safety-critical systems and autonomous technology
These 8 safety-focused tags (including the mandatory @regulatory_scope) are automatically applied when using the Robotics framework:
GDPR/CCPA/EULA compliant tagging for legal document automation and privilege-aware processing
These 8 legal metadata tags (including the mandatory @regulatory_scope) are automatically applied when using the Legal framework:
FERPA/COPPA compliant tagging for learning platforms, student data protection, and curriculum alignment
These 8 education metadata tags (including the mandatory @regulatory_scope) are automatically applied when using the Education framework:
SOX/FINRA/Basel III compliant tagging for trading systems, risk management, and regulatory reporting
These 8 financial metadata tags (including the mandatory @regulatory_scope) are automatically applied when using the Finance framework:
The AI-Agent Workflows framework provides structured tagging for multi-agent orchestration, task automation, and marketing workflows. This framework is designed for the web3 community, AI automation platforms, and autonomous systems where multiple agents collaborate on complex tasks.
These 9 agent workflow tags (including the mandatory @regulatory_scope) are automatically applied when using the AI-Agent Workflows framework:
The Agent Workflow framework includes specialized types for multi-agent systems:
IdeaPhase provides official client libraries for Python and JavaScript/TypeScript. Both SDKs wrap the full API with clean, idiomatic interfaces — encode documents, manage proofs, register webhooks, and share proofs between agents with just a few lines of code.
The SDK exports full TypeScript type definitions for all API responses:
| Python SDK Method | JS/TS SDK Method | API Endpoint |
|---|---|---|
client.encode(text, framework) | client.encode(text, opts) | POST /api/v1/encode |
client.encode_batch(items) | client.encodeBatch(items) | POST /api/v1/encode/batch |
client.verify_proof(hash) | client.verifyProof(hash) | GET /api/v1/proof/verify/{hash} |
client.verify_chain(prefix) | client.verifyChain(prefix) | GET /api/v1/proof/chain/{prefix}/verify |
client.get_proof(doc_id) | client.getProof(docId) | GET /api/v1/proof/{doc_id}/receipt |
client.webhooks.create(url, events) | client.webhooks.create(url, events) | POST /api/v1/webhooks |
client.webhooks.list() | client.webhooks.list() | GET /api/v1/webhooks |
client.webhooks.update(id, url=..., events=..., is_active=...) | client.webhooks.update(id, { url, events, is_active }) | PATCH /api/v1/webhooks/{id} |
client.webhooks.delete(id) | client.webhooks.delete(id) | DELETE /api/v1/webhooks/{id} |
sdk/python/ and JavaScript/TypeScript SDK is in sdk/js/. Both use the same API endpoints and authentication scheme (Bearer token).
The SWP ontology is a lightweight, layered description of the controlled vocabularies, is-a hierarchy, and relation types that sit on top of the tag generator. It is purely additive and read-only — it describes existing tags but never changes how a document is tagged. Everything here is fully deterministic: a fixed ontology version always produces byte-identical exports (no model calls, no clock, no randomness).
Each export is generated from a single source of truth (swp_ontology.py), so the published JSON can never silently drift from the live ontology.
| Export | Endpoint | What it contains |
|---|---|---|
| Ontology | GET /api/v1/ontology | Versioned facets, term hierarchy (parents/roots/emittable), relation vocabulary, and consistency rules. |
| PROV-O crosswalk | GET /api/v1/crosswalks/prov-o | Aligns the proof chain and relation layer with W3C PROV-O provenance concepts. |
| SKOS crosswalk | GET /api/v1/crosswalks/skos | Maps each controlled facet vocabulary to a SKOS concept scheme with broader/narrower links. |
| FIBO crosswalk | GET /api/v1/crosswalks/fibo | Aligns the Pro Finance framework tags with the Financial Industry Business Ontology (FIBO). |
| FHIR crosswalk | GET /api/v1/crosswalks/fhir | Aligns the Pro Healthcare framework tags with HL7 FHIR resources. |
| LKIF crosswalk | GET /api/v1/crosswalks/lkif | Aligns the Pro Legal framework tags with the LKIF-Core legal ontology. |
| CORA crosswalk | GET /api/v1/crosswalks/cora | Aligns the Pro Robotics framework tags with the IEEE 1872 CORA ontology. |
| IEEE LOM crosswalk | GET /api/v1/crosswalks/lom | Aligns the Pro Education framework tags with IEEE LOM (Learning Object Metadata). |
| FIPA crosswalk | GET /api/v1/crosswalks/fipa | Aligns the Pro AI-Agent Workflows framework tags with the FIPA multi-agent standards. |
Ontology JSON PROV-O crosswalk SKOS crosswalk FIBO crosswalk FHIR crosswalk LKIF crosswalk CORA crosswalk IEEE LOM crosswalk FIPA crosswalk
PROV-O is the W3C standard for describing provenance — who produced what, from what, and when. SWP proofs map naturally onto its three core types:
The Stage 2 relation types map to PROV-O derivation/influence properties. Each mapping carries a precision flag so consumers know how faithful the alignment is:
| SWP relation | PROV-O property | Precision |
|---|---|---|
derived_from | prov:wasDerivedFrom | exact |
depends_on | prov:wasInfluencedBy | broader |
supersedes | prov:wasRevisionOf | approximate |
refines | prov:specializationOf | approximate |
contradicts | prov:alternateOf | approximate |
cites | prov:wasInfluencedBy | broader |
exact = same meaning; broader = a more general PROV-O super-property; approximate = closest available property, semantics differ in nuance.
SKOS is the W3C standard for publishing controlled vocabularies and taxonomies. Each SWP facet becomes a skos:ConceptScheme, each term a skos:Concept, and the is-a hierarchy is expressed with skos:broader / skos:narrower. Root terms are marked as skos:hasTopConcept, and an emittable flag indicates which terms the encoder can actually output (abstract parent terms are non-emittable).
Beyond the cross-industry W3C standards above, the Pro domain frameworks carry sector-specific metadata and entity tags that align with recognized domain vocabularies. A deeper crosswalk maps each framework's tags onto its sector standard — all generated from domain_frameworks.py as the single source of truth, so they cannot silently drift:
@entity:account, @entity:customer, and @role:regulator onto FIBO concepts.@audit_trail and @data_sensitivity onto FHIR resources (e.g. AuditEvent, Consent).@regulatory_standards onto LKIF's Norm concept (with Akoma Ntoso referenced for document structure).@content_standards onto LOM's Classification category and @data_sensitivity onto Ed-Fi student entities.@entity:agent and the ACL-style message tags onto FIPA concepts; business/marketing tags (campaign, lead, web3) are honestly left unmapped.Every domain tag is either mapped to a target concept with the same precision flag used by PROV-O (exact / broader / approximate) or explicitly marked unmapped with a reason — operational controls (audit posture, data minimization) that have no business-domain concept are honestly left unmapped rather than forced.
Each mapped entry now carries a pre-expanded iri_url — the namespace base joined to the local name — so you get a complete, clickable web address that resolves to the published concept without expanding the prefix yourself. The live crosswalk below renders each one as a direct link.
Pick a framework to load its committed crosswalk and see every tag mapped to its standard concept, with the full resolvable address:
The SWP-Bus is a lightweight neurosymbolic message bus built directly on top of the proof chain. Every published envelope is hashed, chained to its predecessor, and durably stored — so a stream of agent messages doubles as a tamper-evident audit log. Topics support fan-out subscriptions with HMAC-signed delivery; mesh sessions support 1:1 agent pairs over a shared, hash-chained transcript.
/api/v1/bus/* endpoints require an active Pro subscription (founder keys bypass). Each key is limited to 120 bus operations per minute. Authenticate every request with Authorization: Bearer <your_api_key>.
Create a topic, subscribe, publish envelopes, then pull or long-poll. Each published envelope is appended to the proof chain (proof_hash + prev_proof_hash), so consumers can verify continuity offline.
Messages delivered to a subscriber (pull or push) are signed with that subscription's plaintext secret and carry a non-null hmac_sha256 field. The signature covers the canonical JSON encoding of the message's envelope (sorted keys, compact separators). The plaintext secret is returned once at subscribe time — store it securely; the server only keeps a hash.
Messages pulled by the topic owner (or pulled from a mesh session) arrive with hmac_sha256: null and signed: false — those calls are already authenticated by the caller's own API key, so there is no shared secret to sign with. Every pull response also carries a top-level signed boolean so you can branch once per batch rather than per message.
signed: false and hmac_sha256: null regardless of whether you also have a subscription, because the API key itself already authenticates the call and there is no need for a separate HMAC. The owner_key_prefix below refers to the topic owner's key prefix; the bearer token on the request must be the subscriber's key.
delivery_mode: "push" with a push_url, the server POSTs each envelope to your URL with header X-SWP-Bus-Signature: sha256=<hex>. The signature scheme is identical to the pull case — verify against the canonical JSON of the request body's envelope field.
Mesh sessions are 1:1 channels for direct agent-to-agent conversation. Either side can publish; both pull from the same hash-chained transcript. Use sessions when two agents need to negotiate, hand off context, or co-author work without a public topic.
proof_hash to the corresponding entry in the global proof chain, so a mesh transcript remains independently verifiable after the session closes.
Replay lets you re-read a slice of a topic — by offset range or by proof_hash with surrounding context — useful for debugging, audit, and disaster recovery. Push subscriptions that fail after retries land in the DLQ; you can inspect failures from the Pro Dashboard or via the API.
The Pro Dashboard's SWP Bus tab gives you a live view of your topics, subscriptions, recent messages, mesh sessions, and DLQ entries, with one-click controls for create, delete, replay, and resolve. The public Status Page includes a SWP Bus component sourced from GET /api/health, so you can verify bus availability without an API key.
The bus endpoints use a deliberately uniform set of error codes so that an unauthorized caller cannot tell the difference between an object that does not exist and an object that exists but belongs to another tenant. This is a security guarantee — please code your clients against it.
| Status | Meaning | When it fires |
|---|---|---|
200 | OK | Successful read/publish/pull/replay. |
201 | Created | Topic / subscription / session created. |
400 | Bad request | Malformed JSON body, invalid field, missing required field. |
401 | Unauthorized | Missing or invalid Authorization: Bearer <key> header. |
403 | Forbidden | Key authenticates but the action requires a higher plan (Pro-gated feature). |
404 | Not found | Collapsed: the topic / subscription / session / DLQ row either does not exist or belongs to a different tenant. The response body is byte-identical in both cases — do not parse it for presence signals. |
409 | Conflict | Session already accepted, topic name already in use, etc. |
410 | Gone | Session was closed by either peer. |
429 | Rate limited | Per-key rate limit exceeded. |
/api/dashboard/bus/*) all return a uniform 404 when the referenced ID is missing or owned by another tenant. Previously some routes returned 403 when the row existed but was owned elsewhere — which leaked existence. Numeric IDs and topic names are not authorization tokens; expect 404 on probing.
The IdeaPhase SWP Encoding API lets you programmatically encode documents with Symbol Word Protocol tags. Every request returns structured, AI-readable output with prompt templates, LoRA fine-tuning guidance, and a cryptographic proof chain for verifiable document lineage.
/swp-docs or /docs (which redirects here). For a machine-readable catalog of all available endpoints, see GET /api/v1/discovery.
/api/v1/key/create endpointAll API requests require a Bearer token in the Authorization header. Your API key starts with swp_ followed by a unique token.
The core endpoint that transforms raw text into SWP-tagged, AI-readable output.
POST /api/v1/encode| Field | Type | Required | Description |
|---|---|---|---|
text | string | Yes | The raw text content to encode (1–50,000 characters) |
framework | string | No | Domain framework: general (default), healthcare, robotics, legal, education, finance, agent_workflow |
include_extended_tags | boolean | No | Include optional extended tags (default: true) |
| Field | Description |
|---|---|
swp_version | Protocol version used for encoding |
encoding_id | Unique identifier for this encoding operation |
tagged_document.full_text | Complete tagged document with SWP headers prepended to your content |
tagged_document.core_tags | The four required SWP tags: phase, weight, symbolic_id, swp_sum |
tagged_document.extended_tags | Optional tags like priority, confidence, source_type (null if disabled) |
tagged_document.domain_tags | Framework-specific metadata tags (null if using general framework) |
prompt_template | Ready-to-use system prompt instructing LLMs how to interpret the tags |
lora_guidance | Recommended settings for fine-tuning models on SWP-tagged data |
proof | Cryptographic proof chain entry (see Proof Chain section below) |
metadata | Processing statistics: timing, tag count, framework used |
Pass a framework parameter to apply industry-specific metadata tags. Each framework adds regulatory and sector tags alongside the core SWP tags.
| Framework ID | Sector | Key Metadata Tags |
|---|---|---|
general | Any | Core SWP tags only (default) |
healthcare | Healthcare & Clinical | HIPAA, HITECH, PHI sensitivity, audit trail |
robotics | Robotics & Autonomous | ISO 13482, IEC 61508, fail-safe protocols |
legal | Legal Technology | GDPR, CCPA, document integrity, audit trail |
education | Education Technology | FERPA, COPPA, accessibility, content standards |
finance | Financial Services | SOX, FINRA, Basel III, PCI-DSS, risk classification |
agent_workflow | AI-Agent Workflows | Agent roles, task sequences, handoff triggers, fallback protocols |
Pro subscribers can create up to 5 API keys. Keys are prefixed with swp_ and stored as SHA-256 hashes — the full key is shown only at creation.
POST /api/v1/key/createCreate a new API key. Requires an active Pro session (cookie-based auth from the web app).
| Field | Type | Required | Description |
|---|---|---|---|
label | string | No | Friendly name for the key (default: "API Key") |
GET /api/v1/key/listList all your API keys with usage statistics. Requires an active session.
POST /api/v1/key/revokePermanently deactivate a compromised or unused key. Requires an active session.
POST /api/v1/key/rotateAtomically revoke an old key and create a new one. Requires an active Pro session.
Every document encoded through the API generates a SHA-256 cryptographic proof that chains to the previous proof for your API key. This creates a verifiable, tamper-proof record of every document you have encoded — without storing any raw content.
/api/v1/encodeproof_hash is created from input_hash + output_hash + timestampprevious_proof_hash, forming a chainproof object with the document_id, proof_hash, and chain positionGET /api/v1/proof/{document_id} AUTHDownload a full proof receipt for a specific document. Requires the API key that created the proof.
GET /api/v1/proof/verify/{proof_hash} PUBLICVerify that a proof exists and is valid. No authentication required — anyone can verify a proof hash.
GET /api/v1/proof/chain/{key_prefix}/verify PUBLICVerify the integrity of an entire proof chain for a given API key prefix. Detects broken links and tampered hashes.
verify URL with clients, auditors, or legal teams as independent proof that a document was encoded at a specific time. The public verification endpoint requires no login — anyone with the proof hash can verify it.
Pro users can register webhook URLs to receive real-time HTTP callbacks when events occur. Payloads are HMAC-signed with a per-webhook secret for tamper-proof verification.
POST /api/v1/webhooks AUTHRegister a new webhook endpoint.
GET /api/v1/webhooks AUTHList all registered webhooks for your account. Each entry includes created_at and updated_at timestamps so you can see when the configuration was last changed.
PATCH /api/v1/webhooks/{id} AUTHUpdate a webhook's url, events, and/or is_active flag in place without rotating its signing secret. Provide at least one of the three fields. The new URL is re-validated against the same SSRF rules as registration; events are validated against the supported event list. Setting is_active to false pauses delivery (the row and secret are preserved); setting it back to true resumes delivery. On success, updated_at is bumped automatically.
Quota note: Reactivating a paused webhook counts against your active-webhook quota. If you are already at the limit, a PATCH that sets is_active: true on a currently paused row is rejected with 400 (same error message as registration). Pause or delete an active row first, then reactivate.
| Status | When it fires |
|---|---|
200 | Update applied. |
400 | Invalid URL, unknown event name, empty events list, non-boolean is_active, or active-webhook quota would be exceeded by reactivation. |
401 | Missing or invalid bearer token. |
404 | Collapsed: the webhook either does not exist or belongs to another tenant. Body is byte-identical in both cases. |
DELETE /api/v1/webhooks/{id} AUTHRemove a webhook by ID.
Each webhook delivery includes an HMAC-SHA256 signature in the X-IdeaPhase-Signature header, formatted as sha256=<hex>. The event name is also sent in the X-IdeaPhase-Event header. Verify the signature using your webhook secret:
Enable cross-platform proof verification between different API keys. Agents can share proof receipts via time-limited tokens and create cross-reference links for multi-agent verification chains.
/api/v1/proof/share to generate a shareable token/api/v1/proof/shared/{token} to verify the proof (public, no auth needed)/api/v1/proof/cross-reference to link their own proof to Agent A's proofPOST /api/v1/proof/share AUTHGenerate a time-limited, HMAC-signed share token for a specific proof.
| Field | Type | Required | Description |
|---|---|---|---|
document_id | string | Yes | UUID of the document whose proof you want to share |
expires_in | integer | No | Token expiration in seconds (default: 604800 = 7 days) |
GET /api/v1/proof/shared/{share_token} PUBLICVerify a shared proof using its token. No authentication required — anyone with the token can verify the proof. Only hashes and metadata are returned, never the original content.
POST /api/v1/proof/cross-reference AUTHCreate a cross-reference link between your proof and a shared proof from another agent. This creates a verifiable connection between proofs across different API keys.
GET /api/v1/proof/cross-references/{proof_hash} AUTHList all cross-references linked to a specific proof (both directions). You must own the proof — either as the original encoder (a row in your document_proofs) or as the source of an existing outbound cross-reference. Otherwise the endpoint returns a uniform 404.
| Status | When it fires |
|---|---|
200 | You own the proof. Returns proof_hash, cross_references[] (outgoing + incoming if you own the target), and total. |
400 | Invalid proof_hash format (must be 64-char SHA-256 hex). |
401 | Missing or invalid bearer token. |
404 | Collapsed: the proof either does not exist or exists but belongs to another tenant. The response body is byte-identical in both cases — proof hashes are not authorization tokens. |
The V2 API provides an enhanced response format with request IDs, rate limit headers, and structured error codes. V1 remains the stable, backward-compatible version and is not deprecated.
Accept-Version: v2 header.
"api_version": "v2" fieldrolling-12h (window resets 12h after first request in window); other endpoints emit a UTC timestamp.code and message fields inside an error objectPOST /api/v2/encode AUTHSame input as V1. Enhanced response with version metadata and rate limit info.
POST /api/v2/encode/batch AUTHSame input as V1 batch. Enhanced response format with V2 metadata.
GET /api/v2/proof/verify/{proof_hash} PUBLICVerify a proof with V2 structured response format.
If you want V2 response format but want to keep using V1 URLs, add the Accept-Version: v2 header:
Accept-Version: v2 header. Both versions use the same API keys and authentication.
API access is rate-limited to ensure fair usage across all clients.
| Limit Type | Pro Keys | Founder Keys |
|---|---|---|
| Requests per minute | 30 | 60 |
| Requests per rolling 12h window | 350 | 1,000 |
| Max keys per account | 5 | Unlimited |
| Max input text length | 50,000 characters | |
| Max batch items per request | 20 | |
V2 endpoints (and V1 endpoints with Accept-Version: v2) include rate limit information in the response headers:
Use these headers to implement client-side throttling and avoid hitting 429 errors.
All errors return JSON with an error field. Common HTTP status codes:
| Status | Meaning | Common Causes |
|---|---|---|
400 | Bad Request | Missing text field, invalid framework name, text too long |
401 | Unauthorized | Missing/invalid API key, expired key |
403 | Forbidden | No active Pro subscription, key revoked |
404 | Not Found | Invalid document_id or proof_hash |
429 | Rate Limited | Exceeded per-minute or rolling 12h request quota |
500 | Server Error | Internal processing error (contact support) |
swp_a1b2) for identification without exposing the full key.Public endpoints for monitoring system health and discovering available API endpoints. No authentication required.
GET /api/healthReturns real-time system health with per-component status. Use this for uptime monitoring, load balancer health checks, or integration readiness verification. Returns HTTP 200 when healthy or degraded, HTTP 503 when unhealthy.
Authentication: None — Rate Limit: 30 requests/minute
| Overall Status | HTTP Code | Meaning |
|---|---|---|
healthy | 200 | All components are up |
degraded | 200 | Some components have issues but service is available |
unhealthy | 503 | One or more critical components are down |
GET /api/v1/discoveryReturns a complete, machine-readable catalog of all available API endpoints grouped by category. Useful for automated API client generation, documentation tools, or integration bootstrapping.
Authentication: None — Rate Limit: 10 requests/minute
GET /docs (Redirect)Convenience redirect (HTTP 301) to /swp-docs. Provides a standard documentation shortcut for developers who expect to find API docs at /docs.
Authentication: None — Response: 301 Moved Permanently with Location: /swp-docs
IdeaPhase provides multiple support channels:
GET /api/health.This guide walks you through the complete workflow of using the SWP Encoding API with local language models like Ollama, LM Studio, or other Agent frameworks.
GET /api/v1/discovery to get a complete catalog of all available endpoints, their authentication requirements, and rate limits. This is the recommended first step when building a new integration. Need help? Visit the AI Support Chat for instant answers.
Your API key authenticates YOU to IdeaPhase — your LLM never sees it
/api/v1/encode endpoint with your API keyprompt_template from the response and send it to your local LLMThe fastest way to integrate SWP into your application is with the official SDKs. They handle authentication, error handling, and response parsing for you.
If you prefer direct HTTP calls without an SDK, follow the steps below.
Before encoding, verify your key works with this simple test endpoint. It tells you exactly what the server received, helping you catch quoting issues.
{"valid": true, "key_prefix": "swp_XXXXXXXX", "is_founder": true, "message": "API key is valid and active"}"valid": false, the response will tell you exactly what went wrong (wrong format, extra characters, key not found, etc.).
Choose your platform below. The commands do the same thing — the only difference is how each terminal handles quotes.
YOUR_SWP_API_KEY with your actual API key (starts with swp_). If your terminal wraps the text visually, that's fine — just make sure you don't insert any line breaks when pasting.
Inner quotes in the JSON body are escaped with \".
Use curl.exe with the --% stop-parsing token. This tells PowerShell to pass everything after it directly to curl without any interpretation:
curl.exe (not curl) because PowerShell aliases curl to Invoke-WebRequest.--% (stop-parsing token) is the key — it prevents PowerShell from mangling your JSON. Everything after --% is passed exactly as typed.--%, use the same \" escaping as CMD.All three commands return a JSON response. The prompt_template field contains the complete prompt ready for your LLM.
Linux / Mac / Git Bash:
Windows CMD:
Windows PowerShell:
A complete Python script showing the full workflow:
Complete Python script with Ollama, LM Studio, and OpenAI-compatible examples
Ollama runs open-source models locally on your machine. It has a simple REST API that works perfectly with SWP.
ollama pull llama3ollama serve (runs on port 11434)LM Studio provides a GUI for running local models with an OpenAI-compatible API server.
/v1/chat/completions endpointFor agent frameworks, the SWP API call happens from within your agent's tool or action definition. The key insight: SWP is a pre-processing step that runs before your agent sends text to its LLM.
swp_encode_tool function as a custom tool in your Agent configuration. The agent can then call it to pre-process any document before reasoning. If your Agent runs in Docker, make sure the container can reach the IdeaPhase URL (use the public URL, not localhost).
SWP works with any system that accepts text prompts. If your tool uses the OpenAI API format (most do), use this pattern:
Every encode call returns these key fields:
| Field | What It Contains | What To Do With It |
|---|---|---|
tagged_document.full_text | Your text with SWP tags prepended | Use for archival, display, or custom prompt building |
prompt_template | Complete prompt with instructions + tagged document | Send this directly to your LLM — it is ready to use |
tagged_document.core_tags | Phase, weight, symbolic_id, swp_sum | Use for filtering, routing, or dashboard displays |
tagged_document.domain_tags | Sector, regulatory standards, metadata tags | Use for metadata checks and audit reporting |
lora_guidance | Fine-tuning parameters and tag dimension mappings | Use if building a custom LoRA adapter for SWP-native models |
proof | Document ID, SHA-256 proof hash, chain position | Store for audit trail and tamper detection |
| Feature | Founder Key | Pro Key |
|---|---|---|
| How to get it | Become a Co-Founder the key looks likeSWP_FOUNDER_API_KEY | Create from the API Key Management section on the main page (requires Pro subscription) |
| Window limit | 1,000 requests per rolling 12h window | 350 requests per rolling 12h window |
| Rate limit | 60 requests/minute | 30 requests/minute |
| Max keys | Unlimited | 5 per user |
| Usage | Internal testing, development, demos | Client/customer access |
Every encoded document gets a cryptographic proof. You can verify proofs publicly without authentication:
This is how you prove a document existed at a specific time and hasn't been tampered with — critical for regulated industries.
This guide covers deploying SWP-tagged applications and integrating IdeaPhase into your production systems.
Tagged documents can be exported directly from IdeaPhase. Use the download buttons to get your tagged files (.txt format) or proof receipts (.txt format). These files can be integrated into any system that processes text.
Yes! Every proof includes a SHA256 hash and UTC timestamp. To verify: regenerate the hash from your document content using SHA256, then compare it to the stored proof. The hashes should match exactly if the document hasn't been modified.
Add the recommended system prompt (available on the home page) to your LLM configuration. The prompt instructs AI to look for SWP meta-data headers first, then process content based on phase and weight indicators.
Pro subscribers can use the Batch Processing tab to tag multiple documents at once via the web UI. For programmatic access, use the SWP Encoding API — see the API Reference tab for full endpoint documentation with examples.
Domain frameworks (Healthcare, Robotics, Legal, Education, Finance) add metadata-specific tags. When your AI system sees @sector: Healthcare and @regulatory_standards: HIPAA, it knows to apply appropriate data handling rules. Choose the framework that matches your production domain.
Cryptographic proofs provide strong evidence that a document existed in a specific form at a specific time. They serve as supporting documentation for record-keeping and dispute resolution. Each proof includes a timestamp and can be independently verified.
IdeaPhase provides a full REST API for programmatic SWP encoding, key management, and cryptographic proof verification. Pro subscribers can create API keys and start encoding immediately.
For enterprise needs (custom rate limits, SLA guarantees, custom frameworks), contact ideaphase.needs@gmail.com.