codai · Schema

Exec stream event

One SSE `data:` frame of an exec stream. The stream ends after `exit` or `error`.

CompanyArtificial IntelligenceCode GenerationDeveloper ToolsLLM GatewayOpenAI-CompatibleModel RoutingRomania
View JSON Schema on GitHub

JSON Schema

codai-ro-sandbox-exec-event-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/codai-ro/json-schema/codai-ro-sandbox-exec-event-schema.json",
  "title": "Exec stream event",
  "description": "One SSE `data:` frame of an exec stream. The stream ends after `exit` or `error`.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/codai-ro-sandboxes-api-openapi.yml#/components/schemas/SandboxExecEvent",
  "oneOf": [
    {
      "type": "object",
      "title": "start",
      "required": [
        "type",
        "exec_id",
        "instance",
        "restored",
        "restore_ms"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "start"
          ]
        },
        "exec_id": {
          "type": "string"
        },
        "instance": {
          "type": "string"
        },
        "restored": {
          "type": "string",
          "enum": [
            "hot",
            "gcs",
            "empty"
          ]
        },
        "restore_ms": {
          "type": "integer"
        }
      }
    },
    {
      "type": "object",
      "title": "output",
      "required": [
        "type",
        "data"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "stdout",
            "stderr"
          ]
        },
        "data": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "title": "truncated",
      "required": [
        "type",
        "stream"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "truncated"
          ]
        },
        "stream": {
          "type": "string",
          "enum": [
            "stdout",
            "stderr"
          ]
        }
      }
    },
    {
      "type": "object",
      "title": "exit",
      "required": [
        "type",
        "exit_code",
        "timed_out",
        "duration_ms",
        "cpu_ms",
        "generation",
        "workspace_bytes",
        "changed",
        "receipt"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "exit"
          ]
        },
        "exit_code": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The command's own exit status; `128 + n` when it was ended by signal `n`. `null` only when the exec timed out (`timed_out: true`) or the process could not be started."
        },
        "timed_out": {
          "type": "boolean"
        },
        "duration_ms": {
          "type": "integer"
        },
        "cpu_ms": {
          "type": "integer"
        },
        "generation": {
          "type": "integer"
        },
        "workspace_bytes": {
          "type": "integer"
        },
        "changed": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "receipt": {
          "$ref": "#/$defs/SandboxReceipt"
        }
      }
    },
    {
      "type": "object",
      "title": "error",
      "required": [
        "type",
        "code",
        "message"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "error"
          ]
        },
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      }
    }
  ],
  "$defs": {
    "SandboxReceipt": {
      "title": "Reproducibility receipt",
      "description": "What ran and what it produced: image digest, hashes of the inputs and the command, every output file with its SHA-256, and the workspace generations before and after.",
      "type": "object",
      "required": [
        "image_digest",
        "template",
        "input_sha256",
        "command_sha256",
        "outputs",
        "generation_before",
        "generation_after"
      ],
      "properties": {
        "image_digest": {
          "type": "string"
        },
        "template": {
          "type": "string"
        },
        "input_sha256": {
          "type": "string"
        },
        "command_sha256": {
          "type": "string"
        },
        "outputs": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "path",
              "sha256",
              "bytes"
            ],
            "properties": {
              "path": {
                "type": "string"
              },
              "sha256": {
                "type": "string"
              },
              "bytes": {
                "type": "integer"
              }
            }
          }
        },
        "generation_before": {
          "type": "integer"
        },
        "generation_after": {
          "type": "integer"
        }
      }
    }
  }
}

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/codai-ro-sandbox-exec-event"
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.