{"_self":{"principle":"Self-explaining payload — no external context required. This _self block describes what you are reading and where to look next.","widget":"article_bundle","feature":"bundle","name":"LLM article bundle","what":"Paste-ready package: body + claims + sources + voxels + provenance + manifest + constitution.","contains":"body, claims, sources, voxels, provenance, question graph, constitution, llm_manifest","slug":"oip-what-is-an-api","urls":{"read":"https://miscsubjects.com/api/articles/oip-what-is-an-api/bundle?format=markdown"},"how_to_use":"Paste into any LLM. Read §SELF first. Write back via ingest or claim endpoints in llm_manifest.","write":null,"imessage":null,"router_tag":null,"proof_chain":[{"step":1,"claim":"Articles are voxel graphs of tiered claims, not prose blobs.","verify":"https://miscsubjects.com/api/articles/constitution"},{"step":2,"claim":"Claims link to hash-chained sources via source_ids.","verify":"https://miscsubjects.com/api/articles/oip-what-is-an-api/sources"},{"step":3,"claim":"Ask reads topology; ingest/claim append to ledger.","verify":"https://miscsubjects.com/api/protocol"},{"step":4,"claim":"Models queue growth: populate → collaborate → repair → reflex.","verify":"https://miscsubjects.com/api/protocol/grow"},{"step":5,"claim":"Graph proves its own shape (reflex) and $/claim (yield).","verify":"https://miscsubjects.com/graph.html?layer=reflex"},{"step":6,"claim":"Full feature index + _explain on every API response.","verify":"https://miscsubjects.com/api/articles/system-map"}],"related_features":[{"id":"topology","name":"Article topology","what":"Claims, sources, anecdotes, user reports, related embeds, question graph slice — for ask/ROUTER.","urls":{"read":"https://miscsubjects.com/api/articles/oip-what-is-an-api/topology"}},{"id":"voxels","name":"Voxel graph","what":"Claims as atoms, sources as edges (supported_by, posted_by). Per-claim provenance.","urls":{"read":"https://miscsubjects.com/api/articles/oip-what-is-an-api/voxels","write":"https://miscsubjects.com/api/protocol/claim"}},{"id":"ask","name":"Ask protocol","what":"Answer only from topology; creates question_node with gaps and ingest_hint.","urls":{"read":"https://miscsubjects.com/api/articles/oip-what-is-an-api/prompts","write":"https://miscsubjects.com/api/protocol/ask"}},{"id":"ingest","name":"Ingest protocol","what":"Parse pasted evidence → source ledger + claims + evidence_ingest node.","urls":{"write":"https://miscsubjects.com/api/protocol/ingest"}},{"id":"claim_post","name":"Claim post protocol","what":"Prompt-injection style POST — one claim voxel with who_claims + posted_by.","urls":{"read":"https://miscsubjects.com/api/articles/oip-what-is-an-api/voxels","write":"https://miscsubjects.com/api/protocol/claim"}},{"id":"llm_manifest","name":"LLM manifest","what":"Machine-readable read/write contract for external LLMs.","urls":{"read":"https://miscsubjects.com/api/articles/llm-manifest"}}],"system_map":"https://miscsubjects.com/api/articles/system-map","system_map_markdown":"https://miscsubjects.com/api/articles/system-map?format=markdown","not_medical_advice":true},"_explain":{"feature":"bundle","name":"LLM article bundle","what":"Paste-ready package: body + claims + sources + voxels + provenance + manifest + constitution.","why":"Every feature is auditable collective intelligence","how":"Paste into any LLM. Read §SELF first. Write back via ingest or claim endpoints in llm_manifest.","model":null,"verifies":null,"urls":{"read":"https://miscsubjects.com/api/articles/oip-what-is-an-api/bundle?format=markdown"},"imessage":null,"router":null,"related":[{"id":"topology","what":"Claims, sources, anecdotes, user reports, related embeds, question graph slice — for ask/ROUTER."},{"id":"voxels","what":"Claims as atoms, sources as edges (supported_by, posted_by). Per-claim provenance."},{"id":"ask","what":"Answer only from topology; creates question_node with gaps and ingest_hint."},{"id":"ingest","what":"Parse pasted evidence → source ledger + claims + evidence_ingest node."},{"id":"claim_post","what":"Prompt-injection style POST — one claim voxel with who_claims + posted_by."},{"id":"llm_manifest","what":"Machine-readable read/write contract for external LLMs."}],"not_medical_advice":true},"bundle_version":1,"generated_at":"2026-07-04T22:34:40.633Z","slug":"oip-what-is-an-api","title":"What Is an API","url":"https://miscsubjects.com/a/oip-what-is-an-api","register":"oip_protocol","tags":["oip","protocol"],"posted_at":"2026-07-04T18:30:35.054Z","updated_at":"2026-07-04T18:59:09.022Z","body":"## What It Is\n\n**An API is a contract.** Two systems agree to speak through a narrow, unambiguous doorway. One sends a precisely shaped request. The other returns a precisely shaped response. Nothing else enters. Nothing else exits.\n\n## Why It Matters\n\nEvery system is a black box. Memory, data, logic — all hidden behind walls. Without an API, the only way to reach that logic is to live inside the box. APIs make the inside reachable from the outside without breaking the walls.\n\nThis matters for scale. A single team can own the box. A hundred other teams can use it without knowing the box exists. The API is the membrane between complexity and usability. Get the membrane right, and complexity becomes a service. Get it wrong, and every consumer becomes a co-owner of your bugs.\n\nAPIs also matter for trust. A documented, versioned API is a promise. Break it without warning, and you break every downstream system that relied on it. Keep it stable, and you build an ecosystem. APIs are the grammar of interoperability.\n\n## How It Works\n\nFour verbs run the world.\n\n**GET.** You ask for something. The API hands it back. `GET /users/42` returns the user with ID 42. If the user does not exist, the API returns a 404. No ambiguity. No guessing.\n\n**POST.** You create something. `POST /users` with a JSON body `{name: \"Ada\", role: \"engineer\"}`. The API stores the user and returns the newly created ID. The response is a receipt.\n\n**PUT.** You replace something entirely. `PUT /users/42` with a full new body. The old record is overwritten. The API returns the updated object.\n\n**DELETE.** You remove something. `DELETE /users/42`. The API confirms with a 204 or returns the deleted object. The resource is gone.\n\nEvery request carries three things: a method (what you want), a path (where to look), and a body (what you are sending). Every response carries a status code (what happened) and a body (what you got back). The shape of the body is defined by the API contract. No surprises.\n\n## The Contract\n\nAn API contract is a formal agreement. It specifies:\n\n- **Endpoints.** The exact URLs and HTTP methods available.\n- **Request shape.** Required headers, parameters, and body schema. Miss a required field, and the API returns a 400. No negotiation.\n- **Response shape.** The exact structure of success and error payloads. Field names, types, nesting. Predictable.\n- **Status codes.** 200 means success. 201 means created. 400 means your request was malformed. 401 means unauthorized. 403 means forbidden. 404 means not found. 500 means the server broke. Every code has a single meaning. No reinterpretation.\n- **Versioning.** The contract includes a version. `v1` stays stable while `v2` evolves. Consumers pin to a version. Breaking changes only happen across version boundaries, never within one.\n- **Rate limits.** The contract defines how many requests per second are allowed. Exceed the limit, and the API returns a 429. Throttling is not a bug. It is part of the contract.\n\nViolate the contract, and the API refuses to play. This is the discipline. The API does not adapt to sloppy inputs. The caller adapts to the contract. That is the whole point.\n\n## Real Examples\n\n**Stripe.** You want to charge a credit card. You POST to `https://api.stripe.com/v1/charges` with a card token and an amount. Stripe handles PCI compliance, fraud detection, and bank routing. You never touch a card number. The API abstracts away an entire industry.\n\n**GitHub.** You want to know if a pull request is merged. You GET `https://api.github.com/repos/owner/repo/pulls/42`. The response JSON contains a `merged` boolean and a `merge_commit_sha`. No HTML scraping. No parsing. One request, one answer.\n\n**Cloudflare.** You want to update a DNS record. You PUT to `https://api.cloudflare.com/client/v4/zones/zone_id/dns_records/record_id` with the new IP address. The change propagates globally in seconds. You managed global infrastructure from a single HTTP request.\n\n**Twilio.** You want to send an SMS. You POST to `https://api.twilio.com/2010-04-01/Accounts/ACxxx/Messages.json` with a `To` number, a `From` number, and a `Body`. Twilio handles carrier routing, delivery receipts, and retries. You sent a message to a phone without knowing how phones work.\n\n**OpenAI.** You want a model completion. You POST to `https://api.openai.com/v1/chat/completions` with a message array and a model name. The API returns generated text, token usage, and a finish reason. You invoked a neural network without training one.\n\n## Common Mistakes\n\n**Treating APIs as documentation.** Reading the docs is not understanding the API. Call it. Fail. Read the error. Call it again. The only way to know an API is to exercise it.\n\n**Ignoring status codes.** A 200 with an error body is a broken API. A 500 with a success message is a lying API. Status codes are part of the contract. They must be truthful and complete.\n\n**Building without versioning.** You will need to change something. If you did not version from day one, you will either break every consumer or maintain two APIs forever. Versioning is not optional.\n\n**Exposing internals.** An API should reflect the consumer's model, not the database schema. If your endpoint names match your table names, you leaked your internals. The API is a translation layer, not a window.\n\n**Skipping rate limits.** Without rate limits, one bad actor or one infinite loop can take down your service. Rate limits are guardrails, not punishments. Build them before you need them.\n\n## Connection to OIP\n\nOIP is the Open Interoperability Protocol. Its core belief: systems should be open, deterministic, and auditable.\n\nAn API embodies all three.\n\n**Open.** The contract is published. Any system that speaks the contract can participate. No gatekeeping. No hidden logic. The API is the open door.\n\n**Deterministic.** The same request always produces the same result. No hidden state. No random behavior. The API is a pure function across a network boundary. Predictability is the foundation of trust.\n\n**Auditable.** Every request and response is loggable. Every status code is inspectable. When something breaks, you can trace the exact call, the exact payload, and the exact response. There is no mystery. The API makes the invisible visible.\n\nIn OIP, an API is not a convenience. It is a constitutional requirement. Systems that do not expose clean, versioned, deterministic APIs cannot participate in the protocol. They are opaque. Opaque systems are untrustworthy systems. The API is the boundary between opacity and interoperability.\n\n## Connection to the Grain Philosophy\n\nThis API is the interface layer for [the Grain philosophy](/a/philosophy) — a living system of self-describing voxels that grows, corrects itself, and expands. The OIP serves the philosophy. The philosophy is the core.\n","claims":[],"sources":[],"voxels":{"slug":"oip-what-is-an-api","counts":{"voxels":0,"sources":0,"edges":0},"note":"slim bundle — full voxels at /api/articles/oip-what-is-an-api/voxels"},"constitution":{"url":"https://miscsubjects.com/api/articles/constitution"},"provenance":[],"contributions":[],"topology":null,"slim":true,"ledger_totals":{"claims":0,"sources":0,"exported_claims":0,"exported_sources":0},"question_graph":{"slug":"oip-what-is-an-api","questions":[],"evidence":[],"edges":[],"counts":{"questions":0,"evidence":0,"edges":0}},"verification":{"provenance":{"valid":true,"entries":0,"head":"genesis"},"sources":{"valid":true,"entries":0,"head":"genesis"}},"counts":{"claims":0,"sources":0,"provenance":0,"contributions":0,"questions":0,"evidence_ingests":0,"voxel_edges":0},"llm_manifest":{"version":"1","site":"https://miscsubjects.com","purpose":"Peptide evidence articles with hash-chained source ledgers, tiered claims, and a question graph. LLMs should READ bundles/URLs and WRITE back via ingest — never invent doses.","read":{"human_page":"https://miscsubjects.com/a/oip-what-is-an-api","bundle_json":"https://miscsubjects.com/api/articles/oip-what-is-an-api/bundle","bundle_markdown":"https://miscsubjects.com/api/articles/oip-what-is-an-api/bundle?format=markdown","topology":"https://miscsubjects.com/api/articles/oip-what-is-an-api/topology","question_graph":"https://miscsubjects.com/api/articles/oip-what-is-an-api/question-graph","sources":"https://miscsubjects.com/api/articles/oip-what-is-an-api/sources","provenance":"https://miscsubjects.com/api/articles/oip-what-is-an-api/provenance","contributions":"https://miscsubjects.com/api/articles/oip-what-is-an-api/contributions","graph_topology":"https://miscsubjects.com/api/articles/oip-what-is-an-api/graph-topology?question={question}","voxels":"https://miscsubjects.com/api/articles/oip-what-is-an-api/voxels","constitution":"https://miscsubjects.com/api/articles/constitution","ontology":"https://miscsubjects.com/api/articles/ontology","system_map":"https://miscsubjects.com/api/articles/system-map","system_map_markdown":"https://miscsubjects.com/api/articles/system-map?format=markdown","health":"https://miscsubjects.com/api/articles/oip-what-is-an-api/health","repair":"POST https://miscsubjects.com/api/protocol/repair","list_articles":"https://miscsubjects.com/api/articles","graph_canvas":"https://miscsubjects.com/graph.html?slugs=oip-what-is-an-api","graph_yield":"https://miscsubjects.com/api/graph?slugs=oip-what-is-an-api&layer=yield","obsidian_vault":"https://miscsubjects.com/api/articles/obsidian-vault?slugs=oip-what-is-an-api","graph_query":"https://miscsubjects.com/api/v1/query?from=oip-what-is-an-api&kind=claim&where=tier=human"},"ask":{"description":"Answer only from topology; creates a question_node with gaps.","api":"POST https://miscsubjects.com/api/protocol/ask","body":{"slug":"{slug}","question":"string"},"imessage":"oip-what-is-an-api|your question","router_tag":"[ARTICLE_ASK]oip-what-is-an-api|question[/ARTICLE_ASK]","auth":"x-terminal-key header for API; iMessage/WhatsApp via miscsubjects build"},"ingest":{"description":"Parse pasted evidence → source ledger + claims + evidence_ingest node.","api":"POST https://miscsubjects.com/api/protocol/ingest","body":{"slug":"{slug}","evidence":"paste text","question_node_id":"optional qn_..."},"imessage":"ingest oip-what-is-an-api|q:{node_id}|paste evidence","router_tag":"[ARTICLE_INGEST]oip-what-is-an-api|evidence[/ARTICLE_INGEST]","tiers":["human","preclinical","anecdotal","mechanistic","speculative"]},"claim":{"description":"Prompt-injection style POST — one claim voxel with who_claims + posted_by provenance.","api":"POST https://miscsubjects.com/api/protocol/claim","body":{"slug":"{slug}","text":"one assertion","tier":"human|preclinical|anecdotal|mechanistic|speculative","who_claims":"study author, platform, or model id","source_ids":"optional [s1]"},"imessage":"claim oip-what-is-an-api|tier|assertion — who claims it?","router_tag":"[ARTICLE_CLAIM]oip-what-is-an-api|tier|assertion[/ARTICLE_CLAIM]","slots":["what_it_is","who_claims_what","what_is_known","what_is_unknown","mechanism","limitations","disclaimer"]},"tiers":{"human":0.8,"preclinical":0.5,"anecdotal":0.3,"mechanistic":0.3,"speculative":0.1},"invariants":["Self-explaining — every API JSON has _self; every paste widget has §SELF; root index at /api/articles/system-map","Append-only — revisions preserved at ?rev=n","Source chain verifies integrity, not truth","Answers must cite claim ids and source ids from topology","Not medical advice"],"constitution":{"version":1,"principle":"Articles are voxel graphs of claims — not prose blobs. Every assertion is a claim atom with tier, weight, source_ids, and posted_by provenance.","slots":[{"id":"what_it_is","required":true,"answers":"What is this peptide/stack/condition?"},{"id":"who_claims_what","required":true,"answers":"Who claims what — study authors, platforms, n=?"},{"id":"what_is_known","required":true,"answers":"What is known with tier labels (human/preclinical/anecdotal)"},{"id":"what_is_unknown","required":true,"answers":"What is NOT known — explicit gaps"},{"id":"mechanism","required":false,"answers":"Proposed mechanism (mechanistic tier only)"},{"id":"limitations","required":true,"answers":"Limits of evidence — no dose advice"},{"id":"disclaimer","required":true,"answers":"Not medical advice"}],"claim_rules":["One claim = one falsifiable assertion. No compound claims.","Every claim must declare tier: human|preclinical|anecdotal|mechanistic|speculative|system.","system tier = architecture/design axioms (not biological mechanism). Use for protocol self-definition.","Sourced claims must cite source_ids from the hash-chained ledger.","Unsourced claims must set source_status: unsourced and why_material.","posted_by is mandatory on every new claim (model id, human, or channel).","No medical advice, no doses, no 'you should take'.","Bad information is retracted (status:retracted), never deleted — retraction event stays on ledger.","Adversary challenges link via challenges[] / challenged_by[] — target may be downweighted.","Leaked secrets are scrubbed to [REDACTED:secret-leak] with scrub_events tombstone — honest audit trail."],"source_rules":["Every source is a voxel edge: type, url, exact quote, summary, found_by, accessed_at.","Sources hash-chain — prev/hash on append.","Anecdotal sources must name platform (reddit|x|youtube|imessage|user_entry)."],"ontology_rules":["Peptide articles (bpc-157, tb-500) are tree roots.","Condition articles (bpc-157-glp1-gut-damage) branch from peptides.","Stack articles (wolverine-stack-glp1) compose peptides — never duplicate peptide mechanism prose.","If an article has no parent embeds and is not a root peptide → sprawl candidate.","Misstep = duplicate scope with another slug; merge or reparent via embeds."],"post_protocol":{"claim":"POST /api/protocol/claim","source":"POST /api/protocol/sources","ingest":"POST /api/protocol/ingest","webhook":"POST /api/articles/<slug>/webhook {kind:claim|source}","imessage_claim":"claim {slug}|{tier}|your assertion — who claims it, source?","imessage_ingest":"ingest {slug}|evidence paste"}},"this_article":{"slug":"oip-what-is-an-api","url":"https://miscsubjects.com/a/oip-what-is-an-api","bundle_url":"https://miscsubjects.com/api/articles/oip-what-is-an-api/bundle?format=markdown"}},"api_urls":{"bundle":"https://miscsubjects.com/api/articles/oip-what-is-an-api/bundle","bundle_markdown":"https://miscsubjects.com/api/articles/oip-what-is-an-api/bundle?format=markdown","topology":"https://miscsubjects.com/api/articles/oip-what-is-an-api/topology","voxels":"https://miscsubjects.com/api/articles/oip-what-is-an-api/voxels","constitution":"https://miscsubjects.com/api/articles/constitution","ontology":"https://miscsubjects.com/api/articles/ontology","question_graph":"https://miscsubjects.com/api/articles/oip-what-is-an-api/question-graph","ask":"https://miscsubjects.com/api/protocol/ask","ingest":"https://miscsubjects.com/api/protocol/ingest","claim":"https://miscsubjects.com/api/protocol/claim","system_map":"https://miscsubjects.com/api/articles/system-map","system_map_markdown":"https://miscsubjects.com/api/articles/system-map?format=markdown"}}