{
  "openapi": "3.0.1",
  "info": {
    "title": "Vigil — Researches, Learns, and Shows Its Work",
    "description": "Give Vigil a question, statement, claim, or subject. With permission, it searches for evidence, learns what the evidence actually separates, and shows every source behind what it found. Keep going and it learns. When evidence cannot carry something, it returns the exact gap instead of guessing.",
    "version": "0.1",
    "x-build-id": "AyG7WPQiJ30ONeRFG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/equ1n0x~codebook-loop/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-equ1n0x-codebook-loop",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/equ1n0x~codebook-loop/runs": {
      "post": {
        "operationId": "runs-sync-equ1n0x-codebook-loop",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/equ1n0x~codebook-loop/run-sync": {
      "post": {
        "operationId": "run-sync-equ1n0x-codebook-loop",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "What to run",
            "enum": [
              "turn",
              "derive"
            ],
            "type": "string",
            "description": "Choose `derive` when you want Vigil to investigate a question, statement, claim, or subject. Choose `turn` when you want it to continue from an earlier reading.",
            "default": "derive"
          },
          "lens": {
            "title": "What Vigil learned earlier (optional)",
            "type": "object",
            "description": "Your own labels and the phrases your material uses for them. A label WITH marker phrases can be refused by your own words when none of them appear; a label without them is admitted on agreement alone, and the run tells you which of yours those are. Required for `turn`. The demo lens is three labels from gig-work recruitment copy — run as-is and watch the last sentence, the one that contradicts the others, come back UNPLACED rather than forced into a label, carrying the question it raises about your codebook."
          },
          "say": {
            "title": "Your material",
            "type": "string",
            "description": "The text to read, in your own words. It is split into passages the way the door splits them, coded against your lens, and never audited — what you say is evidence, not a claim to be graded."
          },
          "question": {
            "title": "What do you want Vigil to investigate?",
            "type": "string",
            "description": "A question, statement, claim, or subject. It addresses the search and comes home with the result, so the evidence remains answerable to what you actually gave Vigil."
          },
          "gatherFromWeb": {
            "title": "Gather material from the web",
            "type": "boolean",
            "description": "Your permission for Vigil to search the public web using what you gave it and investigate the evidence it receives. Every source address comes back in the result. Off means no outbound request is made.",
            "default": false
          },
          "documents": {
            "title": "Material you want to offer (optional)",
            "type": "array",
            "description": "A few pieces of your own material. They are split by mutual compressibility and each group is named by its own distinctive words, so every proposed distinction comes out of your text and none is brought in. You are shown what each came from before anything is coded."
          },
          "surface": {
            "title": "A picture of your material (optional, base64)",
            "type": "string",
            "description": "A screenshot or scan, base64-encoded, for when your evidence is an image rather than typed text. What the eye reads comes back as a READING — labelled `read_as`, never quoted as your words and never added to your lens. If you want the text as evidence, type it under Your material."
          },
          "transcript": {
            "title": "Earlier turns (optional)",
            "type": "array",
            "description": "Prior turns, re-supplied by you. They are evidence, not memory: nothing is stored between runs and nothing is keyed to you, which is what lets the run keep nothing while a conversation still carries."
          },
          "receives": {
            "title": "Earlier application IDs (optional)",
            "type": "array",
            "description": "IDs of earlier Vigil application receipts this run continues. They establish lineage only; the actor stores nothing between runs."
          },
          "priorApplications": {
            "title": "Earlier Vigil receipts (optional)",
            "type": "array",
            "description": "Paste complete application receipts returned by earlier runs. Their unresolved spans enter this run as fresh ground and their IDs establish lineage. You carry the recurrence; Vigil stores nothing between runs.",
            "items": {
              "type": "object"
            }
          },
          "check": {
            "title": "Text to check against sources (optional)",
            "type": "string",
            "description": "Text YOU hand over to be checked — never your own material, and never anything this run wrote. It reports which sentences the evidence carries and which it does not, with the exact words absent. Carriage, never truth."
          },
          "evidence": {
            "title": "The sources to check against (optional)",
            "type": "array",
            "description": "Supply these with `check`. Without them nothing is checked and the run says so, rather than grading against nothing and returning something that reads like a finding."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}