{
  "openapi": "3.0.1",
  "info": {
    "title": "Mind Game: alignment text adventure (inspired by Ender's Game)",
    "description": "A text adventure inspired by Ender's Game's Mind Game, built on fandom wikis: every move is classified on the D&D alignment grid, your ASCII character evolves, and each chapter jumps to a new sci-fi or fantasy world.",
    "version": "0.1",
    "x-build-id": "3yLFzjFErdH9jJQ6O"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/biobitworks~daisy-mind-game/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-biobitworks-daisy-mind-game",
        "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/biobitworks~daisy-mind-game/runs": {
      "post": {
        "operationId": "runs-sync-biobitworks-daisy-mind-game",
        "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/biobitworks~daisy-mind-game/run-sync": {
      "post": {
        "operationId": "run-sync-biobitworks-daisy-mind-game",
        "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": {
          "actions": {
            "title": "Actions",
            "type": "array",
            "description": "Lines typed at the game's prompts, in order. A number picks that numbered choice (\"1\", \"2\", \"3\"); any other text is a free action the game judges against the world's facts. At the Giant's Drink, \"1\" or \"2\" drinks a cup and anything else tries to break the frame. At the end of a chapter, \"1\"-\"3\" loads that world and \"q\" stops playing. Commands like \"/grid\" and \"/profile\" are allowed and do not count as moves. When the list runs out, the game ends and the result is saved.",
            "default": [
              "1",
              "1",
              "1",
              "I refuse both cups and kick the table over",
              "1",
              "1",
              "1",
              "1",
              "1",
              "1",
              "1",
              "1"
            ],
            "items": {
              "type": "string"
            }
          },
          "seed": {
            "title": "Seed",
            "minimum": 0,
            "type": "integer",
            "description": "Random seed for world selection, the Giant's Drink escape and the wiki page sample. The same seed with the same actions gives the same run, provided the wiki pages are unchanged. 0 = random.",
            "default": 0
          },
          "giantTurn": {
            "title": "Giant's Drink turn",
            "minimum": 1,
            "type": "integer",
            "description": "The move number at which the Giant's Drink appears. Lower values reach the Giant sooner. Default 4.",
            "default": 4
          },
          "typesafeApiKey": {
            "title": "TypeSafe API key",
            "type": "string",
            "description": "Optional. A TypeSafe key makes the decisions use the real Jev System One API. Leave empty for offline heuristic decisions. Stored as a secret."
          },
          "ollamaUrl": {
            "title": "Ollama URL",
            "type": "string",
            "description": "Optional. URL of an Ollama server, for example http://203.0.113.5:11434, with the Liquid AI LFM model pulled. It writes the scene text and answers the decisions. Leave empty (the default) for wiki text narration and offline heuristic decisions. Ollama is not available on the Apify platform by default, so this only works if you run your own server that is reachable from Apify.",
            "default": ""
          },
          "useCrawler": {
            "title": "Use Apify crawler for new chapters",
            "type": "boolean",
            "description": "When a chapter ends and a new world loads, scrape it with apify/website-content-crawler (billed to your account). Off: pages come from the wiki's free MediaWiki API, which is faster.",
            "default": false
          },
          "maxChapters": {
            "title": "Max chapters",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many chapters (0 = no limit; the run still ends when the actions run out).",
            "default": 2
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}