Reason Machines · Schema

CreateSession

Artificial IntelligenceAutomationPlatformSoftware-as-a-ServiceMachine LearningCompany

Properties

Name Type Description
mode string How the Session runs. standard is for normal work, including API sessions targeting a local Mac: it keeps the configured capabilities and accepts follow-up messages. ephemeral runs one benchmark trial
workspace_ownership string Who owns the persistence of the Session's filesystem, independently of mode: managed leaves it to Reason, externally-managed to the caller, which then has to target an explicit headless project_root.
compaction object
personal_context boolean Whether the Session loads its creator's personal context: their personal skills, personal memory (profile and notes), personal secrets and personal connections. false runs it impersonally, on the work
pull_request_policy string Restricts how the Session delivers pull requests. draft_only makes every pull request it opens a draft and refuses, in the server, marking one ready for review, merging, queueing or enabling auto-merg
task_bound_to_device boolean The task's inputs and required outputs exist only on the target worker's root (a benchmark trial): when that worker goes offline, the Session reports the loss instead of moving to Reason cloud, whatev
sandbox_target_id string Explicit sandbox target. Requires devices:use. Cannot be combined with target or managed workspace ownership; unavailable targets are refused without falling back to cloud.
secret_injection boolean Whether stored secrets (workspace, Reason, personal and environment secrets) are injected into the Session's machine and tools. false runs it with none, for work that handles untrusted input; the Sess
experimental_runtime_profile string The agent harness this Session runs; omit it for the default. getDeployment lists the profiles this workspace may name. runtime/reason-c2-tools-v7 is the default C2 harness (read, bash, edit, write an
experimental_runtime_features array Reason features to run on top of the base harness, for an ephemeral Session of the default C2 harness or one of its dated releases; getDeployment lists them. Omit the field for the deployment's defaul
project_id string Deprecated: Projects are retired in favour of Reasons. Existing Project ID from GET /projects or POST /projects. The session is filed under that Project; a Project supplies no repository, machine, net
reason_id string Files the Session under this Reason (listReasons): one of yours, or one shared with you. It is listed under the Reason and, when `repo` is omitted, checks out the Reason's first default repository (it
target object Explicit Hands machine target. Device targets require devices:use plus an owned, eligible root. Headless targets use externally provisioned compute and require the central relay; unavailable targets n
prompt string What the agent should do. Maximum 256 KiB when UTF-8 encoded.
attachments array Up to 10 attachments; maximum 64 MiB per file and 80 MiB total decoded bytes. The endpoint's request-body limit also applies to the encoded payload.
repo string Optional initial connected GitHub repository path in `owner/name` form. Omit it for a scratch session, or, with project_id, for the Reason's first default repository when it has default repositories.
default_repositories boolean false: with project_id and no repo, start a scratch session instead of checking out the Reason's first default repository.
provider string Source-control provider for the repo. GitHub is the only supported provider.
model string The model the agent runs on, by an id listAgentModels returns. Omit it or send `auto` for the workspace default.
model_source_id string Start the Session on this connected account (a `source_id` from listAgentModels' groups[].accounts), for example to spread Sessions across several subscriptions of one provider. Requires `model`, an i
reasoning_effort string Optional reasoning effort override for the selected model.
speed string Fast mode, as the model picker's: `fast` asks the provider for its priority tier, which answers sooner and uses the plan or credits faster; `ultrafast` asks a ChatGPT subscription for its Ultrafast ti
hands_mode string Physical execution policy. `adaptive` (default) starts with Brain and lazily acquires Hands when work needs a shell, files, browser, or sandbox. `brain_only` permanently forbids physical Hands and sec
completion_mode string Requests a durable noninteractive completion envelope. The agent may return success, failure, or action_required plus any JSON result; a run that stops without recording one reports action_required, n
long_running object Long-running Loop for this Session's first task: after the agent's first pass, extra rounds re-examine and continue the work, a reviewer checks it against derived acceptance criteria, and an end the r
tags array At most 50 tags; each tag is at most 100 UTF-8 bytes.
branch string Existing branch to check out and work on; commits land on this branch. Created off the default branch if it does not exist yet. Mutually exclusive with `pr_number` and `ref`.
pr_number integer Continue an existing pull request: the agent checks out its head branch and commits back onto it (no new PR). GitHub only. Mutually exclusive with `branch` and `ref`.
ref string Commit SHA, tag, or branch to snapshot: the agent starts a fresh working branch from this ref and opens a new PR. Mutually exclusive with `branch` and `pr_number`.
base_branch string Branch the Session's pull request targets. Alone, the Session starts from this branch's tip (`ref` defaults to it) and opens its PR against it. With `ref`, the Session starts from that ref, which stay
env object Session-scoped environment variables, injected into the agent's shell for this session only (and its follow-up turns). Names must match `^[A-Za-z_][A-Za-z0-9_]*$` and may not use reserved inference na
client_session_id string A Session id the caller chose (UUID v4), typically the one passed to `POST /sessions/prestart` (predictive start): the new Session takes this id, and the machine prestarted under it when this same cal
idempotency_key string Idempotent create: a retried POST with the same key and the same prompt returns the original session (HTTP 200) instead of creating a duplicate. Reusing the key with a different prompt returns 409 `id
spend_limit_credits stringnull Optional shared session spending ceiling in credits ($0.04 each), including models, machines and manual desktop time. Null retains wallet limits. Automatic delegated sessions share their source ceilin
spend_limit_rcu stringnull Deprecated: use `spend_limit_credits`. The same ceiling in the ledger's former unit (1 = $1/3, 8.33 credits). Sending both is refused unless they are equal.
allow_model_rollover boolean When the Session's subscription or key runs out (a plan's usage limit, no credits left, a refused sign-in), the turn goes on instead of failing on the next source in the Session's routing order: anoth
delegation object Opt-in deeper delegation. Without it the Session's tree is unchanged: two levels deep (the Session's subagents may start their own, which cannot), and subagents never create Sessions. The whole tree i
execution_budget object Optional task authorization shared by automatic continuations and delegated sessions. New tasks have no deadline by default; zero explicitly selects no deadline. Positive durations range from one minu
require_ready boolean Before starting, Reason checks what the Session will be missing from what it already knows: connections (MCP servers and plugins) that are signed out, failed their last check or name a secret with no
View JSON Schema on GitHub

JSON Schema

reasonmachines-com-create-session-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/reasonmachines-com/json-schema/reasonmachines-com-create-session-schema.json",
  "title": "CreateSession",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/reasonmachines-com-openapi.json#/components/schemas/CreateSession",
  "type": "object",
  "properties": {
    "mode": {
      "type": "string",
      "enum": [
        "standard",
        "ephemeral"
      ],
      "default": "standard",
      "description": "How the Session runs. standard is for normal work, including API sessions targeting a local Mac: it keeps the configured capabilities and accepts follow-up messages. ephemeral runs one benchmark trial with the standard capabilities inside a single-use workspace from REST createEphemeralWorkspace (not an MCP tool, since its response holds the workspace's key): it needs that workspace, an externally-managed headless project_root and an idempotency_key, accepts no follow-up messages, and the workspace admits no other Session. The retired isolated mode returns 400 session_mode_retired, and the retired benchmark_profile and runtime_profile fields return 400 benchmark_profile_retired and runtime_profile_retired."
    },
    "workspace_ownership": {
      "type": "string",
      "enum": [
        "managed",
        "externally-managed",
        "ara-managed"
      ],
      "x-reason-deprecated-enum": [
        "ara-managed"
      ],
      "default": "managed",
      "description": "Who owns the persistence of the Session's filesystem, independently of mode: managed leaves it to Reason, externally-managed to the caller, which then has to target an explicit headless project_root. ara-managed is a deprecated spelling of managed, and responses report managed."
    },
    "compaction": {
      "$ref": "#/$defs/SessionCompaction"
    },
    "personal_context": {
      "type": "boolean",
      "default": true,
      "description": "Whether the Session loads its creator's personal context: their personal skills, personal memory (profile and notes), personal secrets and personal connections. false runs it impersonally, on the workspace's and its Reason's own skills, memory, secrets and connections, the same for whoever created it; useful for automation that creates Sessions with someone's API key. The creator still owns the Session for permissions, billing and audit. Follow-ups, continuations and subagents keep the setting."
    },
    "pull_request_policy": {
      "type": "string",
      "enum": [
        "draft_only"
      ],
      "description": "Restricts how the Session delivers pull requests. draft_only makes every pull request it opens a draft and refuses, in the server, marking one ready for review, merging, queueing or enabling auto-merge, adding labels, and publishing to the base or default branch; pr_merge is not granted, and the agent is told so. Omit for the normal delivery flow, in which the agent may merge its own pull request. Follow-ups, continuations, subagents and Sessions it starts keep the setting, and session_policy.pullRequestPolicy reports it: check it in the response, since a server that predates the field ignores it."
    },
    "task_bound_to_device": {
      "type": "boolean",
      "default": false,
      "description": "The task's inputs and required outputs exist only on the target worker's root (a benchmark trial): when that worker goes offline, the Session reports the loss instead of moving to Reason cloud, whatever the workspace's auto-move setting. Requires a headless target with workspace_mode project_root (400 task_bound_requires_headless_project_root). A sandbox_target_id is always bound. An explicit move to another placement ends the binding. A server that predates the field ignores it."
    },
    "sandbox_target_id": {
      "description": "Explicit sandbox target. Requires devices:use. Cannot be combined with target or managed workspace ownership; unavailable targets are refused without falling back to cloud.",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "secret_injection": {
      "type": "boolean",
      "default": true,
      "description": "Whether stored secrets (workspace, Reason, personal and environment secrets) are injected into the Session's machine and tools. false runs it with none, for work that handles untrusted input; the Session's own `env` is still injected on cloud machines, since it is the caller's explicit input, not a stored secret (a connected Device gets none); repository access still works through Reason's own credential. A Session with false runs on a fresh cloud computer of its own that no other Session joins. Follow-ups, continuations and subagents keep the setting, and session_policy.components.secretInjection reports it. Not available in ephemeral mode (400 secret_injection_mode_unsupported)."
    },
    "experimental_runtime_profile": {
      "type": "string",
      "enum": [
        "runtime/reason-capability-shell-v1",
        "runtime/reason-c2-tools-v7",
        "runtime/reason-v7-sync-yield-v1",
        "runtime/reason-v7-sync-yield-machine-sdk-v1",
        "runtime/reason-v7-stock-prompt-v1",
        "runtime/reason-v7-docs-v1",
        "runtime/reason-v7-stock-shape-v1",
        "runtime/reason-v7-bash-clean-v1",
        "runtime/reason-v7-bash-reason-v1",
        "runtime/reason-v7-2026-10",
        "runtime/reason-v7-2026-11",
        "runtime/reason-v8-2026-10",
        "runtime/reason-v8.1-2026-10",
        "runtime/reason-v8.2-2026-10",
        "runtime/reason-agent-1.2",
        "runtime/reason-agent-1.3",
        "runtime/reason-agent-1.3.1"
      ],
      "description": "The agent harness this Session runs; omit it for the default. getDeployment lists the profiles this workspace may name. runtime/reason-c2-tools-v7 is the default C2 harness (read, bash, edit, write and codemode tools) and runs in any mode; naming it changes nothing. runtime/reason-v7-2026-10 and runtime/reason-v7-2026-11 are frozen dated releases of that harness (as it ran in October 2026, and as cut on 2026-10-12), and runtime/reason-v8-2026-10 freezes its Bash-only variant (Bash and a script tool named `reason`, no read, edit or write, as cut on 2026-10-19); runtime/reason-v8.1-2026-10 is runtime/reason-v8-2026-10 with every Bash call yielding at its timeout (a command still running then returns its output so far and keeps running in the background), as cut on 2026-10-22; runtime/reason-v8.2-2026-10 is runtime/reason-v8.1-2026-10 without section zero's guideline to stop exploring after about 25 turns, as cut on 2026-10-24; runtime/reason-agent-1.2 (Reason Agent 1.2) is runtime/reason-v8.2-2026-10 under a standalone, dateless release name, sending and running exactly what it does, and never changes (a change ships as the next version); runtime/reason-agent-1.3 (Reason Agent 1.3) sends what runtime/reason-agent-1.2 sends and also runs output_cap_continue, image_history_append_only and cache_ttl_1h by default, as cut on 2026-10-27; runtime/reason-agent-1.3.1 (Reason Agent 1.3.1) sends what runtime/reason-agent-1.3 sends, runs those three by default without sdk_index (no web tools), and carries a response's unfinished thinking forward as text when the output cap cuts it, as cut on 2026-11-06; so a result that names one names one harness; any organization may name them, in ephemeral mode. The dated releases run on a headless project_root or the user's own Device without a repository. A mode or target a profile does not support returns 400 runtime_profile_mode_unsupported or runtime_profile_target_unsupported, and a retired profile (the deleted sync-yield harness runtime/reason-v7-sync-yield-v1 and runtime/reason-v7-sync-yield-machine-sdk-v1, runtime/reason-capability-shell-v1, and v7's deleted evaluation profiles runtime/reason-v7-stock-prompt-v1, runtime/reason-v7-docs-v1, runtime/reason-v7-stock-shape-v1, runtime/reason-v7-bash-clean-v1 and runtime/reason-v7-bash-reason-v1) returns 400 runtime_profile_retired with a detail naming what to request instead."
    },
    "experimental_runtime_features": {
      "maxItems": 21,
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "banner",
          "sdk_index",
          "service_tier",
          "output_cap",
          "git_metadata",
          "serial_reads",
          "recovery_defer_idle_hands",
          "fewer_tests_low",
          "fewer_tests_medium",
          "fewer_tests_high",
          "fewer_tests_max",
          "fewer_tests_max_alone",
          "verify_line_alone",
          "addendum_placebo",
          "bash_yield",
          "sync_bash",
          "turn_line_removed",
          "turn_line_questions",
          "output_cap_continue",
          "image_history_append_only",
          "cache_ttl_1h"
        ]
      },
      "description": "Reason features to run on top of the base harness, for an ephemeral Session of the default C2 harness or one of its dated releases; getDeployment lists them. Omit the field for the deployment's default set; an empty list runs the base harness alone. banner adds the untrusted-data notice on tool results, sdk_index Reason's tools in codemode, service_tier and output_cap the router's defaults, git_metadata Git diffs around tool calls, and serial_reads one physical call at a time. Experiments run only when named: recovery_defer_idle_hands starts the next model request while the machine reattaches after a deploy handoff with no tool call in flight. The prompt experiments fewer_tests_low, fewer_tests_medium, fewer_tests_high and fewer_tests_max are rungs of one ladder that add an addendum asking for progressively fewer new tests, each yielding to an instruction to write tests and allowing existing tests to run; fewer_tests_max_alone (the max rung without its verification line), verify_line_alone (that line alone) and addendum_placebo (an addendum asking for nothing) split the max rung into its parts. Naming two fewer-tests experiments returns 400 runtime_features_conflict. bash_yield and sync_bash are harness experiments that also run only when named: a Bash command still running after 60 seconds returns its output so far and keeps running in the background, its complete output written to a file; sync_bash also declares sync-yield's Bash (no timeout, a max_output_length head-and-tail bound). Naming bash_yield or sync_bash for runtime/reason-v8.1-2026-10, runtime/reason-v8.2-2026-10, runtime/reason-agent-1.2, runtime/reason-agent-1.3 or runtime/reason-agent-1.3.1, whose Bash already yields at its timeout, returns 400 runtime_features_conflict. turn_line_removed and turn_line_questions are prompt experiments for runtime/reason-v8-2026-10 and runtime/reason-v8.1-2026-10 only: the first drops the release's guideline to stop exploring after about 25 turns, the second keeps that guideline for questions about the code; naming both returns 400 runtime_features_conflict, and naming either for another profile (runtime/reason-v8.2-2026-10, runtime/reason-agent-1.2 and runtime/reason-agent-1.3 and runtime/reason-agent-1.3.1 included, whose section zero has no such guideline) 400 runtime_features_profile_unsupported. output_cap_continue, image_history_append_only and cache_ttl_1h are harness experiments that run only when named (or by default on runtime/reason-agent-1.3 and runtime/reason-agent-1.3.1) and change no prompt or tool declaration, for any profile that takes features: output_cap_continue asks a model request sent straight to Anthropic (a connected Anthropic key) for at most 64,000 output tokens, and continues a turn whose response the output cap cut without a tool call, at most three times in a row; image_history_append_only keeps earlier tool-result images in the history instead of only the newest five, and removes the oldest in one step only when a request would carry more than 20 images or 20 MiB of them; cache_ttl_1h writes the prompt cache of a model request sent straight to Anthropic with the one-hour TTL. Naming features replaces the release's default set, so name sdk_index with any of them to keep it. The Session keeps the list across deploy handoffs and continuations. Another mode returns 400 runtime_features_mode_unsupported, and another runtime profile 400 runtime_features_profile_unsupported."
    },
    "project_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "deprecated": true,
      "description": "Deprecated: Projects are retired in favour of Reasons. Existing Project ID from GET /projects or POST /projects. The session is filed under that Project; a Project supplies no repository, machine, network hosts or target, which come only from repo and target."
    },
    "reason_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "description": "Files the Session under this Reason (listReasons): one of yours, or one shared with you. It is listed under the Reason and, when `repo` is omitted, checks out the Reason's first default repository (its `default_repositories` on getReason). The same id as project_id: send either, or both with the same value (400 otherwise). Messaging the Reason (sendReasonMessage) instead lets the Reason decide how to do the work."
    },
    "target": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "cloud",
              "description": "Run on Reason-managed cloud compute."
            },
            "computer_id": {
              "description": "Start on this cloud computer of the Session's Reason (project_id, else your main Reason): an id from REST createReasonComputer or listReasonComputers (neither is an MCP tool; opt-in computers scopes). It keeps its own size. 409 computer_unavailable when that Reason's Sessions each keep their own computer, or with secret_injection false (such a Session always gets a fresh computer of its own); 404 computer_not_found when it is not one of the Reason's computers you may use.",
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "required": [
            "kind"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "mac",
              "description": "Retired: always refused with 410 mac_device_retired. To run on a Mac, connect it with `reason connect` and use kind headless with the device_id listDevices returns for it."
            },
            "device_id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "The Mac app Device the request names; it is still parsed only so the request gets 410 mac_device_retired. Connect the Mac with `reason connect` and send kind headless with the device_id listDevices returns for it."
            },
            "root_id": {
              "description": "Folder grant on the retired Mac Device. Accepted for older clients, but the request is refused with 410 mac_device_retired; use root_id with kind headless instead.",
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "cwd": {
              "description": "Folder on the retired Mac Device the Session would work in. Accepted for older clients (not combinable with root_id), but the request is refused with 410 mac_device_retired; use cwd with kind headless instead.",
              "type": "string",
              "minLength": 1,
              "maxLength": 4096,
              "pattern": "^\\/[^\\x00-\\x1f\\x7f]*$"
            },
            "isolation": {
              "description": "How the retired Mac Device would have held cwd. Accepted for older clients (only with cwd), but the request is refused with 410 mac_device_retired; use isolation with kind headless instead.",
              "type": "string",
              "enum": [
                "worktree",
                "in_place"
              ]
            }
          },
          "required": [
            "kind",
            "device_id"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "headless",
              "description": "Run on a CLI-connected computer or externally provisioned worker."
            },
            "device_id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Connected computer or worker ID returned by listDevices."
            },
            "root_id": {
              "description": "Optional on your own computer (`reason connect`): omit it to run on the deepest granted folder holding the cwd, else on its home grant (the folder you last used for the repository there, else a managed checkout), or on a worker's only folder. Required when the worker holds several folders, none is its home folder and no cwd is named (409 local_device_root_ambiguous otherwise).",
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "workspace_mode": {
              "description": "Defaults to a stable Session-managed checkout. project_root explicitly operates the selected existing root.",
              "type": "string",
              "enum": [
                "managed",
                "project_root"
              ]
            },
            "workspace_path": {
              "description": "Absolute path of the project_root on the Device, as the client sees it (for example /app). Read only with workspace_mode project_root, as the working directory the default C2 harness names in its model prompt; ignored otherwise, and rejected when the request names experimental_runtime_profile runtime/reason-c2-tools-v7. It grants nothing and never selects a directory.",
              "type": "string",
              "maxLength": 4096,
              "pattern": "^\\/[^\\u0000\\r\\n]*$"
            },
            "cwd": {
              "description": "Your own computer (`reason connect`) only: the absolute folder the Session works in, as for a Mac, in a folder the computer granted Reason (root_id when named, else the deepest one holding it; an older `reason connect`: only inside its home folder). Not combinable with workspace_mode or workspace_path.",
              "type": "string",
              "minLength": 1,
              "maxLength": 4096,
              "pattern": "^\\/[^\\x00-\\x1f\\x7f]*$"
            },
            "isolation": {
              "description": "With cwd: worktree (the default for repository work) gives the Session its own git worktree at ~/.reason/workspace/sessions/<id>/<repository> on branch reason/<id>; in_place works directly in cwd.",
              "type": "string",
              "enum": [
                "worktree",
                "in_place"
              ]
            }
          },
          "required": [
            "kind",
            "device_id"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "machine",
              "description": "Queue this Session on a worker belonging to a named Machine."
            },
            "name": {
              "description": "Machine name (case-insensitive).",
              "type": "string",
              "minLength": 1,
              "maxLength": 63,
              "pattern": "^[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?$"
            },
            "id": {
              "description": "Machine id.",
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "required": [
            "kind"
          ],
          "additionalProperties": false
        }
      ],
      "description": "Explicit Hands machine target. Device targets require devices:use plus an owned, eligible root. Headless targets use externally provisioned compute and require the central relay; unavailable targets never fall back to cloud. A headless Device runs one Session at a time, a person's own computer (`reason connect`) every Session started on it, and any other personal headless worker (no Machine) as many as it advertises: while it is full, create returns 409 device_busy. A `machine` target (set exactly one of `name` or `id`) also requires devices:use; it runs on any eligible worker of that Machine with an externally-managed project_root workspace, and waits FIFO for a free worker (up to 30 minutes, or the execution budget) instead of failing when every worker is busy. It returns 409 machine_unavailable when the Machine has no online eligible worker."
    },
    "prompt": {
      "type": "string",
      "description": "What the agent should do. Maximum 256 KiB when UTF-8 encoded."
    },
    "attachments": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Caller-chosen identifier for this file, kept with the stored attachment. Omitted, the file is numbered by its position: att-1, att-2 and so on."
              },
              "name": {
                "type": "string",
                "description": "File name shown with the attachment, for example screenshot.png. It also supplies the content type when none is given; an empty name becomes attachment-1, attachment-2 and so on."
              },
              "content_type": {
                "type": "string",
                "description": "MIME type of the file, for example image/png. Omitted, the data URL's media type is used; when that is empty or application/octet-stream, the type is inferred from the name's extension."
              },
              "contentType": {
                "description": "Legacy alias of content_type.",
                "type": "string"
              },
              "data_url": {
                "type": "string",
                "description": "Base64 data URL. Stored privately with the Session before dispatch."
              }
            },
            "required": [
              "name",
              "data_url"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Caller-chosen identifier for this file, kept with the stored attachment. Omitted, the file is numbered by its position: att-1, att-2 and so on."
              },
              "name": {
                "type": "string",
                "description": "File name shown with the attachment, for example screenshot.png. It also supplies the content type when none is given; an empty name becomes attachment-1, attachment-2 and so on."
              },
              "content_type": {
                "type": "string",
                "description": "MIME type of the file, for example image/png. Omitted, the data URL's media type is used; when that is empty or application/octet-stream, the type is inferred from the name's extension."
              },
              "contentType": {
                "description": "Legacy alias of content_type.",
                "type": "string"
              },
              "dataUrl": {
                "type": "string",
                "description": "Legacy alias of data_url."
              }
            },
            "required": [
              "name",
              "dataUrl"
            ]
          }
        ]
      },
      "description": "Up to 10 attachments; maximum 64 MiB per file and 80 MiB total decoded bytes. The endpoint's request-body limit also applies to the encoded payload."
    },
    "repo": {
      "type": "string",
      "description": "Optional initial connected GitHub repository path in `owner/name` form. Omit it for a scratch session, or, with project_id, for the Reason's first default repository when it has default repositories."
    },
    "default_repositories": {
      "type": "boolean",
      "const": false,
      "description": "false: with project_id and no repo, start a scratch session instead of checking out the Reason's first default repository."
    },
    "provider": {
      "type": "string",
      "enum": [
        "github"
      ],
      "description": "Source-control provider for the repo. GitHub is the only supported provider."
    },
    "model": {
      "type": "string",
      "description": "The model the agent runs on, by an id listAgentModels returns. Omit it or send `auto` for the workspace default."
    },
    "model_source_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256,
      "description": "Start the Session on this connected account (a `source_id` from listAgentModels' groups[].accounts), for example to spread Sessions across several subscriptions of one provider. Requires `model`, an id that account serves. An account you cannot select, or one that does not serve `model`, returns 400 `model_source_not_selectable` with `valid_model_sources`. By default the Session routes from that account (model rollover). With `allow_model_rollover: false` (or `mode: \"ephemeral\"`) each turn on `model` runs on exactly that account until a later message switches the model or opts back into rollover: when it cannot serve (signed out, removed, out of usage) the turn fails with that account's error and never moves to another account or Reason's credits."
    },
    "reasoning_effort": {
      "type": "string",
      "enum": [
        "minimal",
        "low",
        "medium",
        "high",
        "xhigh",
        "max"
      ],
      "description": "Optional reasoning effort override for the selected model."
    },
    "speed": {
      "type": "string",
      "enum": [
        "standard",
        "fast",
        "ultrafast"
      ],
      "description": "Fast mode, as the model picker's: `fast` asks the provider for its priority tier, which answers sooner and uses the plan or credits faster; `ultrafast` asks a ChatGPT subscription for its Ultrafast tier, faster still (Fast on a model whose account does not list Ultrafast). They take effect where the provider offers them (today a ChatGPT subscription's models); elsewhere the turn runs at standard speed. Omit for standard."
    },
    "hands_mode": {
      "type": "string",
      "enum": [
        "adaptive",
        "brain_only"
      ],
      "description": "Physical execution policy. `adaptive` (default) starts with Brain and lazily acquires Hands when work needs a shell, files, browser, or sandbox. `brain_only` permanently forbids physical Hands and secret materialization for this Session and all of its continuation Attempts; independently created Sessions keep their own policy."
    },
    "completion_mode": {
      "type": "string",
      "const": "run_outcome",
      "description": "Requests a durable noninteractive completion envelope. The agent may return success, failure, or action_required plus any JSON result; a run that stops without recording one reports action_required, never success. Executor/runtime failures remain separate lifecycle errors."
    },
    "long_running": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "`true` keeps the agent working through review rounds; `false` runs a single pass even when the repository's agent enables the Loop."
        },
        "rounds_max": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100000,
          "description": "Most passes over the task, including the first. Defaults to the repository agent's setting, else 4."
        }
      },
      "required": [
        "enabled"
      ],
      "description": "Long-running Loop for this Session's first task: after the agent's first pass, extra rounds re-examine and continue the work, a reviewer checks it against derived acceptance criteria, and an end the reviewer cannot verify reports `needs_review` (with `completion_mode: run_outcome`, outcome `failure`). Follow-up messages run single passes. Requires a cloud Session with a `repo` in a workspace where the Loop is enabled; otherwise create returns 422 `long_running_not_supported`."
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "At most 50 tags; each tag is at most 100 UTF-8 bytes."
    },
    "branch": {
      "type": "string",
      "description": "Existing branch to check out and work on; commits land on this branch. Created off the default branch if it does not exist yet. Mutually exclusive with `pr_number` and `ref`."
    },
    "pr_number": {
      "type": "integer",
      "minimum": 1,
      "description": "Continue an existing pull request: the agent checks out its head branch and commits back onto it (no new PR). GitHub only. Mutually exclusive with `branch` and `ref`."
    },
    "ref": {
      "type": "string",
      "description": "Commit SHA, tag, or branch to snapshot: the agent starts a fresh working branch from this ref and opens a new PR. Mutually exclusive with `branch` and `pr_number`."
    },
    "base_branch": {
      "type": "string",
      "description": "Branch the Session's pull request targets. Alone, the Session starts from this branch's tip (`ref` defaults to it) and opens its PR against it. With `ref`, the Session starts from that ref, which stays the immutable checkout and publication base, and the PR targets this branch. Not combinable with `branch` or `pr_number`."
    },
    "env": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Session-scoped environment variables, injected into the agent's shell for this session only (and its follow-up turns). Names must match `^[A-Za-z_][A-Za-z0-9_]*$` and may not use reserved inference names; at most 64 keys, 32 KB per value, 256 KB total. Values override personal or workspace secrets of the same name, and are write-only (never returned by any read endpoint). On cloud machines they are injected with secret_injection false too, which turns off only stored secrets, so a Session can get one credential while inherited secrets stay off. A connected Device receives a session value only under a name whose stored secret allows Devices, so with secret_injection false it receives none. A value of 8 or more characters is masked in logs and transcripts where it appears verbatim or in a common encoding (reversed, base64, hex, URL-encoded, JSON-escaped); a value the agent transforms any other way is not masked, so do not rely on masking to keep a value from a Session that can read it."
    },
    "client_session_id": {
      "type": "string",
      "format": "uuid",
      "description": "A Session id 

# --- truncated at 32 KB (39 KB total) ---
# Full source: https://artifacts.apis.io/reasonmachines-com/json-schema/reasonmachines-com-create-session-schema.json

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/reasonmachines-com-create-session"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.