{
    "openapi": "3.1.0",
    "info": {
        "title": "Autotab API",
        "description": "AI that does your repetitive work end to end, with superhuman reliability.",
        "version": "0.0.2"
    },
    "servers": [
        {
            "url": "https://api.autotab.com/v1",
            "description": "Autotab API"
        }
    ],
    "paths": {
        "/run/": {
            "post": {
                "tags": [
                    "Run"
                ],
                "summary": "Start",
                "operationId": "start",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/RunSkillRequest"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "description": "Successful Response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "$ref": "#/components/schemas/RunSession"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ],
                                    "title": "Response Start"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found"
                    },
                    "422": {
                        "description": "Validation Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HTTPValidationError"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "HTTPBearer": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Javascript",
                        "source": "import { Configuration, RunApi } from 'autotab';\n\nconst runClient = new RunApi(new Configuration({\n    apiKey: process.env['AUTOTAB_API_KEY'],\n}));\n\nasync function main() {\n  const run = await runClient.start({\n    runSkillRequest: {\n        skillId: \"skill_fe517503-384a-45c5-87a3-94f98126e626\"\n    }\n  });\n  \n  console.log(\"result:\", run);\n}\n\nmain();"
                    },
                    {
                        "lang": "Python",
                        "source": "import autotab\nfrom autotab import RunSkillRequest\nfrom autotab.rest import ApiException\n\n\nclient = autotab.Client(\n    autotab.Configuration(\n        api_key = os.environ[\"AUTOTAB_API_KEY\"]\n    )\n)\n\ntry:\n    run = await autotab.RunApi(client).start(\n        run_skill_request=RunSkillRequest(\n            skill_id=\"skill_a6738f77-afc2-454e-a6d6-207caa8d145f\",\n            inputs={\n                \"query\": \"OpenAI news\"\n            }\n        )\n    )\nexcept ApiException as e:\n    print(f\"Exception: {e})\n"
                    }
                ]
            }
        },
        "/run/list": {
            "get": {
                "tags": [
                    "Run"
                ],
                "summary": "List",
                "operationId": "list_runs",
                "security": [
                    {
                        "HTTPBearer": []
                    }
                ],
                "parameters": [
                    {
                        "name": "skill_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "anyOf": [
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "null"
                                }
                            ],
                            "description": "The skill to list run sessions for",
                            "title": "Skill Id"
                        },
                        "description": "The skill to list run sessions for"
                    },
                    {
                        "name": "state_filter",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "anyOf": [
                                {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/RunSessionState"
                                    }
                                },
                                {
                                    "type": "null"
                                }
                            ],
                            "description": "The state filter to list run sessions for",
                            "title": "State Filter"
                        },
                        "description": "The state filter to list run sessions for"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful Response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/RunSession"
                                    },
                                    "title": "Response List Runs"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found"
                    },
                    "422": {
                        "description": "Validation Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HTTPValidationError"
                                }
                            }
                        }
                    }
                },
                "x-codeSamples": [
                    {
                        "lang": "Javascript",
                        "source": "\nimport { Configuration, RunApi } from 'autotab';\n\nconst runClient = new RunApi(new Configuration({\n    apiKey: process.env['AUTOTAB_API_KEY'],\n}));\n\nasync function main() {\n  const runs = await runClient.list();\n  console.log(\"runs:\", runs);\n}\n\nmain();"
                    },
                    {
                        "lang": "Python",
                        "source": "import autotab\nfrom autotab.rest import ApiException\nfrom pprint import pprint\n\n\nclient = autotab.Client(\n    autotab.Configuration(\n        api_key = os.environ[\"AUTOTAB_API_KEY\"]\n    )\n)\n\nruns = await autotab.RunApi(client).list()\n"
                    }
                ]
            }
        },
        "/run/{id}": {
            "get": {
                "tags": [
                    "Run"
                ],
                "summary": "Retrieve",
                "operationId": "retrieve_run",
                "security": [
                    {
                        "HTTPBearer": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "title": "Id"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful Response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "$ref": "#/components/schemas/RunSession"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ],
                                    "title": "Response Retrieve Run"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found"
                    },
                    "422": {
                        "description": "Validation Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HTTPValidationError"
                                }
                            }
                        }
                    }
                },
                "x-codeSamples": [
                    {
                        "lang": "Javascript",
                        "source": "\nimport { Configuration, RunApi } from 'autotab';\n\nconst runClient = new RunApi(new Configuration({\n    apiKey: process.env['AUTOTAB_API_KEY'],\n}));\n\nasync function main() {\n  const run = await runClient.retrieve({\n    id: \"run_344ed4ce-6c14-4b13-96b5-3bbb2000c2e5\"\n  });\n}\n\nmain();"
                    },
                    {
                        "lang": "Python",
                        "source": "import autotab\nfrom autotab.rest import ApiException\nfrom pprint import pprint\n\n\nclient = autotab.Client(\n    autotab.Configuration(\n        api_key = os.environ[\"AUTOTAB_API_KEY\"]\n    )\n)\n\ntry:\n    run = await autotab.RunApi(client).retrieve(\n        id=\"run_344ed4ce-6c14-4b13-96b5-3bbb2000c2e5\"\n    )\n    print(f\"state: {run.state} output: {run.data}\")\nexcept ApiException as e:\n    print(f\"Exception: {e})\n"
                    }
                ]
            }
        },
        "/run/{id}/cancel": {
            "post": {
                "tags": [
                    "Run"
                ],
                "summary": "Cancel",
                "operationId": "cancel",
                "security": [
                    {
                        "HTTPBearer": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "title": "Id"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful Response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ],
                                    "title": "Response Cancel"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found"
                    },
                    "422": {
                        "description": "Validation Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HTTPValidationError"
                                }
                            }
                        }
                    }
                },
                "x-codeSamples": [
                    {
                        "lang": "Python",
                        "source": "import autotab\nfrom autotab.rest import ApiException\nfrom pprint import pprint\n\n\nclient = autotab.Client(\n    autotab.Configuration(\n        api_key = os.environ[\"AUTOTAB_API_KEY\"]\n    )\n)\n\ntry:\n    await autotab.RunApi(client).cancel(\n        id=\"run_344ed4ce-6c14-4b13-96b5-3bbb2000c2e5\"\n    )\nexcept ApiException as e:\n    print(f\"Exception: {e})"
                    },
                    {
                        "lang": "Javascript",
                        "source": "\nimport { Configuration, RunApi } from 'autotab';\n\nconst runClient = new RunApi(new Configuration({\n    apiKey: process.env['AUTOTAB_API_KEY'],\n}));\n\nasync function main() {\n  await runClient.cancel({\n    id: \"run_344ed4ce-6c14-4b13-96b5-3bbb2000c2e5\"\n  });\n}\n\nmain();"
                    }
                ]
            }
        },
        "/run/{id}/video_url": {
            "get": {
                "tags": [
                    "Run"
                ],
                "summary": "Video Url",
                "operationId": "video_url",
                "security": [
                    {
                        "HTTPBearer": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "title": "Id"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful Response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ],
                                    "title": "Response Video Url"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found"
                    },
                    "422": {
                        "description": "Validation Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HTTPValidationError"
                                }
                            }
                        }
                    }
                },
                "x-codeSamples": [
                    {
                        "lang": "Javascript",
                        "source": "\nimport { Configuration, RunApi } from 'autotab';\n\nconst runClient = new RunApi(new Configuration({\n    apiKey: process.env['AUTOTAB_API_KEY'],\n}));\n\nasync function main() {\n  const runs = await runClient.list();\n  console.log(\"runs:\", runs);\n}\n\nmain();"
                    },
                    {
                        "lang": "Python",
                        "source": "import autotab\nfrom autotab.rest import ApiException\nfrom pprint import pprint\n\n\nclient = autotab.Client(\n    autotab.Configuration(\n        api_key = os.environ[\"AUTOTAB_API_KEY\"]\n    )\n)\n\nruns = await autotab.RunApi(client).list()\n"
                    }
                ]
            }
        },
        "/skill/list": {
            "get": {
                "tags": [
                    "Skill"
                ],
                "summary": "List",
                "operationId": "list_skills",
                "responses": {
                    "200": {
                        "description": "Successful Response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "items": {
                                        "$ref": "#/components/schemas/Skill"
                                    },
                                    "type": "array",
                                    "title": "Response List Skills"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found"
                    }
                },
                "security": [
                    {
                        "HTTPBearer": []
                    }
                ],
                "x-codeSamples": [
                    {
                        "lang": "Python",
                        "source": "import autotab\nfrom autotab.rest import ApiException\n\n\nclient = autotab.Client(\n    autotab.Configuration(\n        api_key = os.environ[\"AUTOTAB_API_KEY\"]\n    )\n)\n\ntry:\n    skills = await autotab.SkillApi(client).list()\n    print(f\"skills: {\"\\n\".join([skill.model_dump_json(indent=2) for skill in skills])}\")\nexcept ApiException as e:\n    print(f\"Exception: {e})\n"
                    },
                    {
                        "lang": "Javascript",
                        "source": "import { Configuration, SkillApi } from 'autotab';\n\nconst skillClient = new SkillApi(new Configuration({\n    apiKey: process.env['AUTOTAB_API_KEY'],\n}));\n\nasync function main() {\n  const skills = await skillClient.list();\n  console.log(\"skills:\", skills);\n}\n\nmain();"
                    }
                ]
            }
        },
        "/skill/{id}": {
            "get": {
                "tags": [
                    "Skill"
                ],
                "summary": "Retrieve",
                "operationId": "retrieve_skill",
                "security": [
                    {
                        "HTTPBearer": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "title": "Id"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful Response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "$ref": "#/components/schemas/Skill"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ],
                                    "title": "Response Retrieve Skill"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found"
                    },
                    "422": {
                        "description": "Validation Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HTTPValidationError"
                                }
                            }
                        }
                    }
                },
                "x-codeSamples": [
                    {
                        "lang": "Python",
                        "source": "import autotab\nfrom autotab.rest import ApiException\n\n\nclient = autotab.Client(\n    autotab.Configuration(\n        api_key = os.environ[\"AUTOTAB_API_KEY\"]\n    )\n)\n\ntry:\n    skill = await autotab.SkillApi(client).retrieve(\n        id=\"skill_923d8f38-be0d-4637-9fbe-46ec9cb48312\"\n    )\n    print(f\"skill: {skill.model_dump_json(indent=2)}\")\nexcept ApiException as e:\n    print(f\"Exception: {e})\n"
                    },
                    {
                        "lang": "Javascript",
                        "source": "import { Configuration, SkillApi } from 'autotab';\n\nconst skillClient = new SkillApi(new Configuration({\n    apiKey: process.env['AUTOTAB_API_KEY'],\n}));\n\nasync function main() {\n  const skill = await skillClient.retrieve({\n    id: \"skill_923d8f38-be0d-4637-9fbe-46ec9cb48312\"\n  });\n  \n  console.log(\"skill:\", skill);\n}\n\nmain();"
                    }
                ]
            }
        }
    },
    "components": {
        "schemas": {
            "Environment": {
                "type": "string",
                "enum": [
                    "client",
                    "cloud"
                ],
                "title": "Environment"
            },
            "HTTPValidationError": {
                "properties": {
                    "detail": {
                        "items": {
                            "$ref": "#/components/schemas/ValidationError"
                        },
                        "type": "array",
                        "title": "Detail"
                    }
                },
                "type": "object",
                "title": "HTTPValidationError"
            },
            "Input": {
                "properties": {
                    "json_key": {
                        "type": "string",
                        "title": "Json Key"
                    },
                    "id": {
                        "type": "string",
                        "title": "Id"
                    },
                    "data_type": {
                        "$ref": "#/components/schemas/VariableDataType"
                    }
                },
                "type": "object",
                "required": [
                    "json_key",
                    "id",
                    "data_type"
                ],
                "title": "Input"
            },
            "RunSession": {
                "properties": {
                    "id": {
                        "type": "string",
                        "title": "Id"
                    },
                    "skill_id": {
                        "type": "string",
                        "title": "Skill Id"
                    },
                    "owner": {
                        "type": "string",
                        "title": "Owner"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "title": "Created At"
                    },
                    "environment": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/Environment"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "start_time": {
                        "type": "string",
                        "format": "date-time",
                        "title": "Start Time"
                    },
                    "name": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Name"
                    },
                    "end_time": {
                        "anyOf": [
                            {
                                "type": "string",
                                "format": "date-time"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "End Time"
                    },
                    "state": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/RunSessionState"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "inputs": {
                        "anyOf": [
                            {
                                "type": "object"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Inputs"
                    },
                    "data": {
                        "anyOf": [
                            {
                                "type": "object"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Data"
                    },
                    "video_url": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Video Url"
                    }
                },
                "type": "object",
                "required": [
                    "id",
                    "skill_id",
                    "owner",
                    "created_at",
                    "environment",
                    "start_time"
                ],
                "title": "RunSession"
            },
            "RunSessionState": {
                "type": "string",
                "enum": [
                    "play",
                    "pause",
                    "finish",
                    "reset",
                    "cancel",
                    "timeout",
                    "editing"
                ],
                "title": "RunSessionState"
            },
            "RunSkillRequest": {
                "properties": {
                    "skill_id": {
                        "type": "string",
                        "title": "Skill Id"
                    },
                    "inputs": {
                        "anyOf": [
                            {
                                "additionalProperties": {
                                    "type": "string"
                                },
                                "type": "object"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Inputs"
                    }
                },
                "type": "object",
                "required": [
                    "skill_id"
                ],
                "title": "RunSkillRequest"
            },
            "Skill": {
                "properties": {
                    "id": {
                        "type": "string",
                        "title": "Id"
                    },
                    "name": {
                        "type": "string",
                        "title": "Name"
                    },
                    "description": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Description"
                    },
                    "owner": {
                        "type": "string",
                        "title": "Owner"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "title": "Created At"
                    },
                    "last_modified_at": {
                        "anyOf": [
                            {
                                "type": "string",
                                "format": "date-time"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "title": "Last Modified At"
                    },
                    "inputs": {
                        "items": {
                            "$ref": "#/components/schemas/Input"
                        },
                        "type": "array",
                        "title": "Inputs",
                        "default": []
                    }
                },
                "type": "object",
                "required": [
                    "id",
                    "name",
                    "owner",
                    "created_at",
                    "last_modified_at"
                ],
                "title": "Skill"
            },
            "ValidationError": {
                "properties": {
                    "loc": {
                        "items": {
                            "anyOf": [
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "integer"
                                }
                            ]
                        },
                        "type": "array",
                        "title": "Location"
                    },
                    "msg": {
                        "type": "string",
                        "title": "Message"
                    },
                    "type": {
                        "type": "string",
                        "title": "Error Type"
                    }
                },
                "type": "object",
                "required": [
                    "loc",
                    "msg",
                    "type"
                ],
                "title": "ValidationError"
            },
            "VariableDataType": {
                "type": "string",
                "enum": [
                    "string",
                    "number",
                    "boolean",
                    "array",
                    "object",
                    "file",
                    "tab",
                    "ref"
                ],
                "title": "VariableDataType"
            }
        },
        "securitySchemes": {
            "HTTPBearer": {
                "type": "http",
                "description": "Your Autotab API key",
                "scheme": "bearer"
            }
        }
    }
}