{
  "_self": {
    "protocol": "OIP",
    "version": "1.2.0",
    "widget": "object:OPENAI_IMAGE",
    "name": "OPENAI_IMAGE",
    "principle": "Self-explaining payload — no external context required. This _self block is the capability: what it is, how to run it, how to change it, and where to look next.",
    "what": "OpenAI gpt-image-1.5 text-to-image. Stores to R2, returns a stable https://miscsubjects.com/img/ link",
    "when_to_use": "you need to openai image",
    "run_now": "https://miscsubjects.com/api/dispatch?invoke=OPENAI_IMAGE&body=%3Cprompt%3E%7C%3Csize(1024x1024%3E&share=<TOKEN>",
    "how": "Open run_now (URL, fires the example), or POST https://miscsubjects.com/api/dispatch {\"key\":\"OPENAI_IMAGE\",\"body\":\"<prompt>|<size(1024x1024>\"}. From the router: [OPENAI_IMAGE]arg1|arg2[/OPENAI_IMAGE]",
    "object_type": "tool",
    "directory_type": "fn",
    "runner": "edge",
    "category": "openai",
    "target": "openaiImage",
    "inputs": {
      "args": "prompt|size(1024x1024|1536x1024|1024x1536)"
    },
    "outputs": "{ ok, result, invocation, yield, _self } — result is this object's output; yield is tokens/cost/material; invocation is the ledgered record.",
    "operation_semantics": {
      "operation_type": "invokeaction",
      "safe": null,
      "idempotent": null,
      "preconditions": [
        "the current credential passes scope, ancestor, tenant, risk, owner-gate, fixed-body, use-budget, and payload-ceiling enforcement",
        "the supplied body conforms to input_schema"
      ],
      "effects": [
        "runner-defined effects; the invocation receipt is authoritative"
      ],
      "postconditions": [
        "a receipt records execution status, observed output, lineage, and evidence links"
      ]
    },
    "example": "[OPENAI_IMAGE]<prompt>|<size(1024x1024>[/OPENAI_IMAGE]",
    "example_args": "<prompt>|<size(1024x1024>",
    "example_source": "derived",
    "example_note": "Shape derived from this row — replace <angle-bracket> parts with real values.",
    "auth": "none",
    "risk": "high",
    "requires_approval": true,
    "status": "active",
    "affordances": {
      "computed_for": "public",
      "note": "Only moves this credential can take are listed. The server enforces scope regardless; an omitted move would be denied anyway.",
      "operations": [
        {
          "op": "contract",
          "method": "GET",
          "href": "https://miscsubjects.com/api/dispatch?key=OPENAI_IMAGE&format=markdown",
          "returns": "this object's full contract (public docs plane)"
        },
        {
          "op": "confirm",
          "method": "GET",
          "href": "https://miscsubjects.com/api/dispatch?confirm=INV_ID",
          "returns": "public proof that an invocation happened — no credential needed"
        }
      ]
    },
    "invoke": {
      "post": "https://miscsubjects.com/api/dispatch",
      "body": {
        "key": "OPENAI_IMAGE",
        "body": "<prompt>|<size(1024x1024>"
      },
      "router": "[OPENAI_IMAGE]args[/OPENAI_IMAGE]",
      "run_now": "https://miscsubjects.com/api/dispatch?invoke=OPENAI_IMAGE&body=%3Cprompt%3E%7C%3Csize(1024x1024%3E&share=<TOKEN>"
    },
    "urls": {
      "self": "https://miscsubjects.com/api/dispatch?key=OPENAI_IMAGE",
      "root_tree": "https://miscsubjects.com/api/dispatch?map=1&format=markdown",
      "system_article": "https://miscsubjects.com/api/dispatch?map=OPENAI&format=markdown",
      "invoke": "https://miscsubjects.com/api/dispatch",
      "history": "https://miscsubjects.com/api/invocations?object_id=OPENAI_IMAGE",
      "registry": "https://miscsubjects.com/api/dispatch?registry=1",
      "ask": "https://miscsubjects.com/api/dispatch?ask=how+do+i+...",
      "schema": "https://miscsubjects.com/api/dispatch?schema=invocation",
      "system_map": "https://miscsubjects.com/api/articles/system-map",
      "ledger": "https://miscsubjects.com/admin/ledger"
    },
    "article": {
      "title": "OPENAI_IMAGE — generated OIP capability article",
      "path": "OIP > OPENAI > OPENAI_IMAGE",
      "system": "OPENAI",
      "root_tree": "https://miscsubjects.com/api/dispatch?map=1&format=markdown",
      "parent_system": "https://miscsubjects.com/api/dispatch?map=OPENAI&format=markdown",
      "append_only_ledger": "https://miscsubjects.com/api/invocations?object_id=OPENAI_IMAGE",
      "receipt_pattern": "https://miscsubjects.com/api/dispatch?receipt=inv_ID&share=<TOKEN>"
    },
    "machine_contract": [
      "Read this article first; do not infer the row shape from memory.",
      "If acting with a URL-only tool, open run_now after replacing placeholder args.",
      "If the call returns ran:false or proof.ok:false, read the receipt and repair the failed invocation instead of narrating success.",
      "If the token denies the call, report the denial exactly; do not switch to a broader action unless the owner supplied a broader token."
    ],
    "troubleshooting": [
      {
        "problem": "unknown key",
        "action": "Use the did_you_mean links or ask URL; never guess another key.",
        "url": "https://miscsubjects.com/api/dispatch?ask=OPENAI_IMAGE"
      },
      {
        "problem": "argument/body mismatch",
        "action": "Read inputs/example_args here, then retry with repairs: inv_ID so lineage closes.",
        "url": "https://miscsubjects.com/api/dispatch?key=OPENAI_IMAGE"
      },
      {
        "problem": "expired or corrupted token",
        "action": "Report token_expired/token_corrupted from the response; owner mints a fresh scoped link.",
        "url": "https://miscsubjects.com/api/dispatch?explain=1&share=<TOKEN>"
      },
      {
        "problem": "tool returned ok:false / exit nonzero",
        "action": "Do not call it sent. Read the receipt, correct the body, fire a repair.",
        "url": "https://miscsubjects.com/api/dispatch?receipt=inv_ID&share=<TOKEN>"
      }
    ],
    "learn": "Read this block; it is complete. Run it: POST /api/dispatch {key,body}. Change it: PATCH /api/directory/OPENAI_IMAGE {content}. See its edges: GET urls.history. Find siblings: GET urls.ask.",
    "proof_chain": [
      {
        "step": 1,
        "claim": "Every capability is an invokable object with its own _self — this block.",
        "verify": "https://miscsubjects.com/api/dispatch?key=OPENAI_IMAGE"
      },
      {
        "step": 2,
        "claim": "You run it by POSTing to /api/dispatch; in a model turn the router tag is [OPENAI_IMAGE]args[/OPENAI_IMAGE].",
        "verify": "https://miscsubjects.com/api/dispatch?registry=1"
      },
      {
        "step": 3,
        "claim": "Every invocation is ledgered with actor, cost, and material/waste.",
        "verify": "https://miscsubjects.com/api/invocations?object_id=OPENAI_IMAGE"
      },
      {
        "step": 4,
        "claim": "You can ask the build for capabilities in plain language.",
        "verify": "https://miscsubjects.com/api/dispatch?ask=OpenAI%20gpt-image-1.5%20text-to-image.%20Stor"
      },
      {
        "step": 5,
        "claim": "The whole build is one self-describing map, with the terminal key.",
        "verify": "https://miscsubjects.com/api/dispatch?build=1"
      }
    ],
    "related": [
      {
        "id": "registry",
        "what": "Every capability, self-describing",
        "url": "https://miscsubjects.com/api/dispatch?registry=1"
      },
      {
        "id": "ask",
        "what": "Ask the build what to use, in plain language",
        "url": "https://miscsubjects.com/api/dispatch?ask=<question>"
      },
      {
        "id": "history",
        "what": "This capability's invocation history — its edges",
        "url": "https://miscsubjects.com/api/invocations?object_id=OPENAI_IMAGE"
      },
      {
        "id": "build",
        "what": "The whole build as one map (terminal key)",
        "url": "https://miscsubjects.com/api/dispatch?build=1"
      }
    ],
    "trace_id": null,
    "not_project_knowledge": true
  },
  "object": {
    "id": "OPENAI_IMAGE",
    "object_type": "tool",
    "runner": "edge",
    "directory_type": "fn",
    "category": "openai",
    "target": "openaiImage",
    "description": "WHAT: OpenAI gpt-image-1.5 text-to-image. Stores to R2, returns a stable https://miscsubjects.com/img/ link WHEN_TO_USE: you need to openai image ARGS: prompt|size(1024x1024|1536x1024|1024x1536) EX: [OPENAI_IMAGE]arg1|arg2[/OPENAI_IMAGE]",
    "read": "https://miscsubjects.com/api/directory/OPENAI_IMAGE",
    "write": "https://miscsubjects.com/api/dispatch",
    "invoke": "https://miscsubjects.com/api/dispatch",
    "invoke_body": {
      "key": "OPENAI_IMAGE",
      "body": ""
    },
    "router_tag": "[OPENAI_IMAGE]args[/OPENAI_IMAGE]",
    "input_schema": null,
    "examples": null,
    "auth": "none",
    "risk": "high",
    "requires_approval": true,
    "status": "active",
    "ledger_enabled": true,
    "operation_semantics": {
      "operation_type": "invokeaction",
      "safe": null,
      "idempotent": null,
      "preconditions": [
        "the current credential passes scope, ancestor, tenant, risk, owner-gate, fixed-body, use-budget, and payload-ceiling enforcement",
        "the supplied body conforms to input_schema"
      ],
      "effects": [
        "runner-defined effects; the invocation receipt is authoritative"
      ],
      "postconditions": [
        "a receipt records execution status, observed output, lineage, and evidence links"
      ]
    }
  }
}