Beatra AI · Schema

TaskEnvelope

Standard Task envelope. Returned by every async-creation endpoint, GET /v1/tasks/{id}, and the body of customer callback POSTs.

CompanyArtificial IntelligenceMulti-ModalGenerationSocial Data

Properties

Name Type Description
object string
task_id string
status string
capability string
workload_type string
model object Caller-requested model verbatim (may be 'auto'). Null for social_operation tasks.
resolved_model object Actual model that ran (null until execution starts; equals model for explicit-model calls)
model_selection_reason null Deprecated. Always null.
social object
metadata object
input object
progress object
output object
warnings array
error object
usage object
billing object
callback object
created_at string
started_at object
deadline_at object
completed_at object
cancel_requested_at object
links object
View JSON Schema on GitHub

JSON Schema

beatra-ai-task-envelope-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/beatra-ai/json-schema/beatra-ai-task-envelope-schema.json",
  "title": "TaskEnvelope",
  "description": "Standard Task envelope.\n\nReturned by every async-creation endpoint, GET /v1/tasks/{id}, and\nthe body of customer callback POSTs.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/beatra-ai-audio-api-openapi.yml#/components/schemas/TaskEnvelope",
  "properties": {
    "object": {
      "type": "string",
      "const": "task",
      "title": "Object",
      "default": "task"
    },
    "task_id": {
      "type": "string",
      "title": "Task Id"
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "running",
        "succeeded",
        "failed",
        "canceled"
      ],
      "title": "Status"
    },
    "capability": {
      "type": "string",
      "title": "Capability"
    },
    "workload_type": {
      "type": "string",
      "enum": [
        "model",
        "social_operation"
      ],
      "title": "Workload Type",
      "default": "model"
    },
    "model": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Model",
      "description": "Caller-requested model verbatim (may be 'auto'). Null for social_operation tasks."
    },
    "resolved_model": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Resolved Model",
      "description": "Actual model that ran (null until execution starts; equals model for explicit-model calls)"
    },
    "model_selection_reason": {
      "type": "null",
      "title": "Model Selection Reason",
      "description": "Deprecated. Always null.",
      "deprecated": true
    },
    "social": {
      "anyOf": [
        {
          "$ref": "#/$defs/SocialTaskIdentity"
        },
        {
          "type": "null"
        }
      ]
    },
    "metadata": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Metadata"
    },
    "input": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Input"
    },
    "progress": {
      "anyOf": [
        {
          "$ref": "#/$defs/app__api__v1__schemas__common__TaskProgress"
        },
        {
          "type": "null"
        }
      ]
    },
    "output": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Output"
    },
    "warnings": {
      "items": {
        "$ref": "#/$defs/TaskWarning"
      },
      "type": "array",
      "title": "Warnings"
    },
    "error": {
      "anyOf": [
        {
          "$ref": "#/$defs/app__api__v1__schemas__common__TaskError"
        },
        {
          "type": "null"
        }
      ]
    },
    "usage": {
      "anyOf": [
        {
          "$ref": "#/$defs/UsageObject"
        },
        {
          "type": "null"
        }
      ]
    },
    "billing": {
      "anyOf": [
        {
          "$ref": "#/$defs/TaskBilling"
        },
        {
          "type": "null"
        }
      ]
    },
    "callback": {
      "anyOf": [
        {
          "$ref": "#/$defs/TaskCallback"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "started_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Started At"
    },
    "deadline_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Deadline At"
    },
    "completed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Completed At"
    },
    "cancel_requested_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Cancel Requested At"
    },
    "links": {
      "$ref": "#/$defs/TaskLinks"
    }
  },
  "type": "object",
  "required": [
    "task_id",
    "status",
    "capability",
    "created_at",
    "links"
  ],
  "$defs": {
    "SocialTaskIdentity": {
      "properties": {
        "platform": {
          "type": "string",
          "title": "Platform"
        },
        "operation_key": {
          "type": "string",
          "title": "Operation Key"
        },
        "operation_name": {
          "type": "string",
          "title": "Operation Name"
        },
        "schema_hash": {
          "type": "string",
          "title": "Schema Hash"
        }
      },
      "type": "object",
      "required": [
        "platform",
        "operation_key",
        "operation_name",
        "schema_hash"
      ],
      "title": "SocialTaskIdentity"
    },
    "TaskBilling": {
      "properties": {
        "charged_credits": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
            },
            {
              "type": "null"
            }
          ],
          "title": "Charged Credits",
          "description": "Credits charged to wallet for this Task. Populated by PR-2/3."
        },
        "refunded_credits": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
            },
            {
              "type": "null"
            }
          ],
          "title": "Refunded Credits",
          "description": "Credits refunded for this Task. Populated by PR-3."
        },
        "granted_credits": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
            },
            {
              "type": "null"
            }
          ],
          "title": "Granted Credits",
          "description": "Credits on this Task covered by a directed grant rather than by the wallet, net of any revocation. Absent when no grant applied."
        },
        "grant_source": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Grant Source",
          "description": "Which grant covered it. Present exactly when granted_credits is."
        },
        "net_charged_credits": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
            },
            {
              "type": "null"
            }
          ],
          "title": "Net Charged Credits",
          "description": "Final customer charge: charged_credits minus refunded_credits minus granted_credits. This is the number to report as what the Task cost."
        }
      },
      "type": "object",
      "title": "TaskBilling"
    },
    "TaskCallback": {
      "properties": {
        "url": {
          "type": "string",
          "title": "Url"
        },
        "status": {
          "type": "string",
          "enum": [
            "pending",
            "dispatching",
            "delivered",
            "retrying",
            "failed"
          ],
          "title": "Status"
        },
        "attempt_count": {
          "type": "integer",
          "title": "Attempt Count"
        },
        "delivered_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Delivered At"
        },
        "last_error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Last Error",
          "description": "Stable Beatra-owned callback delivery failure summary."
        }
      },
      "type": "object",
      "required": [
        "url",
        "status",
        "attempt_count"
      ],
      "title": "TaskCallback"
    },
    "TaskLinks": {
      "properties": {
        "self": {
          "type": "string",
          "title": "Self"
        },
        "cancel": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Cancel"
        },
        "assets": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Assets",
          "description": "Absolute customer-console URL for viewing and managing the generated artifacts."
        }
      },
      "type": "object",
      "required": [
        "self"
      ],
      "title": "TaskLinks"
    },
    "TaskWarning": {
      "properties": {
        "code": {
          "type": "string",
          "title": "Code",
          "description": "e.g. option_clamped / auto_routed"
        },
        "message": {
          "type": "string",
          "title": "Message"
        },
        "field": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Field"
        }
      },
      "type": "object",
      "required": [
        "code",
        "message"
      ],
      "title": "TaskWarning"
    },
    "UsageLine": {
      "properties": {
        "meter": {
          "type": "string",
          "title": "Meter",
          "description": "e.g. input_token / output_token / image_count / input_video_second / output_video_second"
        },
        "quantity": {
          "type": "string",
          "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
          "title": "Quantity",
          "description": "Decimal — number of meter units consumed"
        },
        "unit": {
          "type": "string",
          "title": "Unit",
          "description": "Display unit, e.g. 'token' / 'image' / 'second'"
        },
        "billed_amount_credits": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
            },
            {
              "type": "null"
            }
          ],
          "title": "Billed Amount Credits",
          "description": "Credits charged for this usage line. Populated by PR-2/3."
        }
      },
      "type": "object",
      "required": [
        "meter",
        "quantity",
        "unit"
      ],
      "title": "UsageLine"
    },
    "UsageObject": {
      "properties": {
        "input_tokens": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Input Tokens"
        },
        "output_tokens": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Output Tokens"
        },
        "cache_read_tokens": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Cache Read Tokens"
        },
        "cache_creation_tokens": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Cache Creation Tokens"
        },
        "reasoning_tokens": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Reasoning Tokens"
        },
        "image_count": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Image Count"
        },
        "image_pixels": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Image Pixels"
        },
        "video_seconds": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Video Seconds"
        },
        "input_video_seconds": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Input Video Seconds",
          "description": "Authoritative input-video seconds included in settled video usage."
        },
        "output_video_seconds": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Output Video Seconds",
          "description": "Authoritative generated/output-video seconds included in settled video usage."
        },
        "audio_seconds": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Audio Seconds"
        },
        "characters": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Characters"
        },
        "lines": {
          "items": {
            "$ref": "#/$defs/UsageLine"
          },
          "type": "array",
          "title": "Lines"
        },
        "credits": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
            },
            {
              "type": "null"
            }
          ],
          "title": "Credits",
          "description": "Credits charged for this Task. Populated by PR-2 / PR-3."
        }
      },
      "type": "object",
      "title": "UsageObject"
    },
    "app__api__v1__schemas__common__TaskError": {
      "properties": {
        "code": {
          "type": "string",
          "title": "Code",
          "description": "Stable machine-readable public error code."
        },
        "type": {
          "type": "string",
          "title": "Type",
          "description": "Stable public error family."
        },
        "message": {
          "type": "string",
          "title": "Message",
          "description": "Human-readable safe failure reason."
        },
        "retryable": {
          "type": "boolean",
          "title": "Retryable",
          "description": "Whether the same logical request may succeed when retried unchanged."
        },
        "param": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Param",
          "description": "JSON Pointer to the relevant request or output field."
        },
        "details": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Details",
          "description": "Provider-neutral expected, received, supported, or candidate failure facts."
        },
        "request_id": {
          "type": "string",
          "title": "Request Id",
          "description": "Request trace identifier for support and correlation."
        }
      },
      "type": "object",
      "required": [
        "code",
        "type",
        "message",
        "retryable",
        "request_id"
      ],
      "title": "TaskError"
    },
    "app__api__v1__schemas__common__TaskProgress": {
      "properties": {
        "percent": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 100.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Percent"
        },
        "stage": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Stage"
        },
        "message": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Message"
        }
      },
      "type": "object",
      "title": "TaskProgress"
    }
  }
}

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/beatra-ai-task-envelope"
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.