{
  "openapi": "3.0.1",
  "info": {
    "title": "Chevet Subagent (Low-Cost High Frequency Agent)",
    "description": "AI subagent with OpenAI-compatible chat completions. ChevetAI Qwen is primary with OpenRouter DeepSeek fallback. Successful runs use low-cost PPE pricing; tools, including deep research, are included. Failed or incomplete runs publish no success output.",
    "version": "1.0",
    "x-build-id": "VUfahOPcxXmKyPt5a"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/oscar.smith-owner~chevet-subagent/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-oscar.smith-owner-chevet-subagent",
        "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/oscar.smith-owner~chevet-subagent/runs": {
      "post": {
        "operationId": "runs-sync-oscar.smith-owner-chevet-subagent",
        "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/oscar.smith-owner~chevet-subagent/run-sync": {
      "post": {
        "operationId": "run-sync-oscar.smith-owner-chevet-subagent",
        "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": {
          "messages": {
            "title": "Messages (OpenAI Chat format)",
            "type": "array",
            "description": "Array of message objects in standard OpenAI format: [{ role: 'system'|'user'|'assistant', content: '...' }].",
            "items": {
              "type": "object",
              "properties": {
                "role": {
                  "title": "Role",
                  "type": "string",
                  "description": "Role of the message author: system, user, assistant, or tool",
                  "enum": [
                    "system",
                    "user",
                    "assistant",
                    "tool"
                  ]
                },
                "content": {
                  "title": "Content",
                  "type": "string",
                  "description": "The contents of the message"
                },
                "name": {
                  "title": "Name",
                  "type": "string",
                  "description": "An optional name for the participant"
                }
              },
              "required": [
                "role",
                "content"
              ]
            }
          },
          "prompt": {
            "title": "Direct Prompt (Alternative to messages)",
            "type": "string",
            "description": "Convenience input if messages array is omitted. Converted automatically to a user message. A short, no-tools example is prefilled so the Actor can be tried immediately."
          },
          "system_prompt": {
            "title": "System Prompt Override / Prefix",
            "type": "string",
            "description": "Optional instructions to set the subagent persona, goal, or context."
          },
          "enable_tools": {
            "title": "Enable Tools",
            "type": "boolean",
            "description": "If enabled, tools are permitted for this sub-agent execution. If disabled, executes raw LLM inference only.",
            "default": false
          },
          "tool_profile": {
            "title": "Tool Profile",
            "enum": [
              "full",
              "research",
              "data",
              "web_api",
              "workspace"
            ],
            "type": "string",
            "description": "Optional focused tool set. Full preserves all existing tools; focused profiles reduce prompt overhead and restrict unavailable tools.",
            "default": "full"
          },
          "enable_thinking": {
            "title": "Enable Thinking",
            "type": "boolean",
            "description": "If enabled, generates chain-of-thought thinking and returns the full reasoning trace alongside the normal output.",
            "default": false
          },
          "temperature": {
            "title": "Temperature",
            "minimum": 0,
            "maximum": 2,
            "type": "number",
            "description": "Sampling temperature between 0.0 and 2.0. Lower values are more deterministic.",
            "default": 0.7
          },
          "max_tokens": {
            "title": "Max Tokens",
            "minimum": 1,
            "maximum": 16384,
            "type": "integer",
            "description": "Maximum tokens to generate per model turn. Defaults to 16,000; the runner dynamically reserves prompt/tool context so no Qwen request exceeds its 32,000-token window.",
            "default": 16000
          },
          "max_total_output_tokens": {
            "title": "Maximum Total Generated Tokens",
            "minimum": 1,
            "maximum": 64000,
            "type": "integer",
            "description": "Aggregate generated-token allowance across all model turns. Maximum 64,000; each individual request remains context-bounded.",
            "default": 64000
          },
          "max_tool_uses": {
            "title": "Maximum Normal Tool Uses",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "Maximum tool calls across the entire request (0–4). Tool results are context-bounded; web retrieval returns excerpts, never whole pages.",
            "default": 4
          },
          "top_p": {
            "title": "Top P",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Nucleus sampling probability.",
            "default": 1
          },
          "json_mode": {
            "title": "JSON Mode",
            "type": "boolean",
            "description": "Guarantees the model returns a valid JSON object (sets response_format: { type: 'json_object' }).",
            "default": false
          },
          "response_format": {
            "title": "Response Format (OpenAI format)",
            "type": "object",
            "description": "Optional OpenAI response format specification (e.g., { 'type': 'json_object' })."
          },
          "model": {
            "title": "Model Override",
            "type": "string",
            "description": "Optional override for the model identifier."
          },
          "apify_token": {
            "title": "Personal Apify API Token (Optional)",
            "type": "string",
            "description": "Your personal Apify API token (starts with 'apify_api_...'). Required only if you want the subagent to use the Apify Actor Bridge to spawn specialized scrapers under your account."
          },
          "apify_actor_access_mode": {
            "title": "Apify Actor Access Mode",
            "enum": [
              "allowlist",
              "blocklist"
            ],
            "type": "string",
            "description": "Required with an Apify token: allow only listed actors, or block listed actors."
          },
          "apify_actor_ids": {
            "title": "Apify Actor IDs Policy List",
            "type": "array",
            "description": "Required with an Apify token. Exact actor IDs or supported aliases governed by the selected access mode.",
            "items": {
              "type": "string"
            }
          },
          "apify_max_total_charge_usd": {
            "title": "Maximum Downstream Apify Spend (USD)",
            "minimum": 0.01,
            "type": "number",
            "description": "Required with an Apify token. Hard aggregate cap allocated across approved downstream actor calls."
          },
          "apify_max_calls": {
            "title": "Maximum Downstream Actor Calls",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Maximum actor runs the subagent may start. Defaults to 1; maximum 5.",
            "default": 1
          },
          "debug": {
            "title": "Debug Mode",
            "type": "boolean",
            "description": "Attach latency, provider resolution, and execution telemetry to dataset record.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}