Skip to content

taskRequestSchema

const taskRequestSchema: object

The JSON Schemas those models were generated from, for runtime use.

readonly $id: "https://schemas.inderun.dev/1.0/task-request.schema.json"

readonly $schema: "https://json-schema.org/draft/2020-12/schema"

readonly additionalProperties: true

readonly allOf: readonly [{ if: { properties: { task: { properties: { kind: { const: "text_to_text"; }; }; type: "object"; }; }; }; then: { anyOf: readonly [{ required: readonly ["prompt"]; }, { required: readonly ["messages"]; }]; not: { anyOf: readonly [{ required: readonly […]; }, { required: readonly […]; }]; }; }; }, { if: { properties: { task: { properties: { kind: { const: "text_to_speech"; }; }; type: "object"; }; }; }; then: { not: { anyOf: readonly [{ required: readonly […]; }, { required: readonly […]; }, { required: readonly […]; }]; }; properties: { delivery: { properties: { mode: { enum: readonly […, …]; }; }; type: "object"; }; }; required: readonly ["speech", "delivery"]; }; }]

readonly description: "The request payload for a run() or stream() execution. The common envelope (schemaVersion, requestId, task, modelProfile, constraints, preferences, telemetry, authContextRef) is task-agnostic; each task kind owns its payload (ADR 016). text_to_text: at least one of `prompt` (single-turn) or `messages` (multi-turn) must be present — both may be present together, though callers should typically supply just one — and `speech`/`delivery` are forbidden. text_to_speech: `speech` and `delivery` are required and `prompt`, `messages` and `generation` are forbidden. `constraints`/`preferences` steer routing but never select a provider directly."

readonly properties: object

readonly authContextRef: object

readonly description: "A unique identifier used to retrieve credentials from a secure local storage. Raw sensitive keys (API keys, etc.) should NEVER be placed directly in the request payload."

readonly minLength: 1

readonly type: "string"

readonly constraints: object

properties.constraints.additionalProperties

Section titled “properties.constraints.additionalProperties”

readonly additionalProperties: true

readonly description: "Request-level routing constraints used by the planner."

readonly properties: object

readonly cloud: object

properties.constraints.properties.cloud.description

Section titled “properties.constraints.properties.cloud.description”

readonly description: "Cloud execution constraint."

properties.constraints.properties.cloud.enum

Section titled “properties.constraints.properties.cloud.enum”

readonly enum: readonly ["forbidden", "allowed", "required"]

readonly privacy: object

properties.constraints.properties.privacy.description

Section titled “properties.constraints.properties.privacy.description”

readonly description: "Privacy requirement or preference for execution placement."

properties.constraints.properties.privacy.enum

Section titled “properties.constraints.properties.privacy.enum”

readonly enum: readonly ["local_required", "local_preferred", "cloud_allowed", "cloud_required"]

properties.constraints.properties.timeoutMs

Section titled “properties.constraints.properties.timeoutMs”

readonly timeoutMs: object

properties.constraints.properties.timeoutMs.description

Section titled “properties.constraints.properties.timeoutMs.description”

readonly description: "Optional timeout budget in milliseconds, passed to the planner and to providers. It bounds the time until the run commits to a provider -- its first content, its first possible audible effect, or its artifact handoff -- not the duration of audio it plays. The engines add no timers of their own."

properties.constraints.properties.timeoutMs.minimum

Section titled “properties.constraints.properties.timeoutMs.minimum”

readonly minimum: 1

properties.constraints.properties.timeoutMs.type

Section titled “properties.constraints.properties.timeoutMs.type”

readonly type: "integer"

readonly type: "object"

readonly delivery: object

readonly additionalProperties: true

readonly description: "How the result of a non-text task must reach the application (ADR 016). Required for non-text tasks and forbidden for text_to_text, whose output is implicitly inline. A provider never substitutes playback for an artifact or the reverse."

readonly else: object

readonly not: object

readonly anyOf: readonly [{ required: readonly ["mediaTypes"]; }, { required: readonly ["destinationRef"]; }]

readonly if: object

readonly properties: object

readonly mode: object

properties.delivery.if.properties.mode.const

Section titled “properties.delivery.if.properties.mode.const”

readonly const: "artifact"

readonly properties: object

properties.delivery.properties.destinationRef

Section titled “properties.delivery.properties.destinationRef”

readonly destinationRef: object

properties.delivery.properties.destinationRef.description

Section titled “properties.delivery.properties.destinationRef.description”

readonly description: "Only valid with 'artifact' delivery: an opaque reference to an application destination the engine writes the finished artifact to, resolved by the host's artifact-destination service (ADR 017) -- never a raw path or URL, like authContextRef for credentials. The result's artifact is then application-owned and the engine keeps no copy. A host without the service refuses the request before routing."

properties.delivery.properties.destinationRef.minLength

Section titled “properties.delivery.properties.destinationRef.minLength”

readonly minLength: 1

properties.delivery.properties.destinationRef.type

Section titled “properties.delivery.properties.destinationRef.type”

readonly type: "string"

readonly mediaTypes: object

properties.delivery.properties.mediaTypes.description

Section titled “properties.delivery.properties.mediaTypes.description”

readonly description: "Only valid with 'artifact' delivery: the acceptable media types, always a hard requirement. Absent means the provider chooses and the artifact reports what it produced."

properties.delivery.properties.mediaTypes.items

Section titled “properties.delivery.properties.mediaTypes.items”

readonly items: object

properties.delivery.properties.mediaTypes.items.minLength

Section titled “properties.delivery.properties.mediaTypes.items.minLength”

readonly minLength: 1

properties.delivery.properties.mediaTypes.items.type

Section titled “properties.delivery.properties.mediaTypes.items.type”

readonly type: "string"

properties.delivery.properties.mediaTypes.minItems

Section titled “properties.delivery.properties.mediaTypes.minItems”

readonly minItems: 1

properties.delivery.properties.mediaTypes.type

Section titled “properties.delivery.properties.mediaTypes.type”

readonly type: "array"

properties.delivery.properties.mediaTypes.uniqueItems

Section titled “properties.delivery.properties.mediaTypes.uniqueItems”

readonly uniqueItems: true

readonly mode: object

readonly $ref: "provider-descriptor.schema.json#/$defs/outputDelivery"

readonly required: readonly ["mode"]

readonly title: "OutputDeliveryRequest"

readonly type: "object"

readonly generation: object

properties.generation.additionalProperties

Section titled “properties.generation.additionalProperties”

readonly additionalProperties: true

readonly description: "Optional configuration for fine-tuning how the AI model generates its response."

readonly properties: object

properties.generation.properties.maxOutputTokens

Section titled “properties.generation.properties.maxOutputTokens”

readonly maxOutputTokens: object

properties.generation.properties.maxOutputTokens.description

Section titled “properties.generation.properties.maxOutputTokens.description”

readonly description: "The maximum number of tokens to generate in a single response."

properties.generation.properties.maxOutputTokens.minimum

Section titled “properties.generation.properties.maxOutputTokens.minimum”

readonly minimum: 1

properties.generation.properties.maxOutputTokens.type

Section titled “properties.generation.properties.maxOutputTokens.type”

readonly type: "integer"

readonly seed: object

properties.generation.properties.seed.description

Section titled “properties.generation.properties.seed.description”

readonly description: "A fixed seed for deterministic generation (where supported by the underlying provider)."

properties.generation.properties.seed.type

Section titled “properties.generation.properties.seed.type”

readonly type: "integer"

readonly stop: object

properties.generation.properties.stop.description

Section titled “properties.generation.properties.stop.description”

readonly description: "Sequence tokens that should terminate the generation process."

properties.generation.properties.stop.items

Section titled “properties.generation.properties.stop.items”

readonly items: object

properties.generation.properties.stop.items.type

Section titled “properties.generation.properties.stop.items.type”

readonly type: "string"

properties.generation.properties.stop.type

Section titled “properties.generation.properties.stop.type”

readonly type: "array"

properties.generation.properties.temperature

Section titled “properties.generation.properties.temperature”

readonly temperature: object

properties.generation.properties.temperature.description

Section titled “properties.generation.properties.temperature.description”

readonly description: "Controls the randomness of the output. Range: 0 (most deterministic) to 2 (highest variance)."

properties.generation.properties.temperature.maximum

Section titled “properties.generation.properties.temperature.maximum”

readonly maximum: 2

properties.generation.properties.temperature.minimum

Section titled “properties.generation.properties.temperature.minimum”

readonly minimum: 0

properties.generation.properties.temperature.type

Section titled “properties.generation.properties.temperature.type”

readonly type: "number"

readonly topP: object

properties.generation.properties.topP.description

Section titled “properties.generation.properties.topP.description”

readonly description: "Nucleus sampling parameter for controlling diversity vs focus in the output."

properties.generation.properties.topP.maximum

Section titled “properties.generation.properties.topP.maximum”

readonly maximum: 1

properties.generation.properties.topP.minimum

Section titled “properties.generation.properties.topP.minimum”

readonly minimum: 0

properties.generation.properties.topP.type

Section titled “properties.generation.properties.topP.type”

readonly type: "number"

readonly type: "object"

readonly messages: object

readonly description: "A list of interaction messages for multi-turn conversation or chat-style execution."

readonly items: object

properties.messages.items.additionalProperties

Section titled “properties.messages.items.additionalProperties”

readonly additionalProperties: true

readonly description: "An individual message in a conversation."

readonly properties: object

properties.messages.items.properties.content

Section titled “properties.messages.items.properties.content”

readonly content: object

properties.messages.items.properties.content.description

Section titled “properties.messages.items.properties.content.description”

readonly description: "The actual text content of the message."

properties.messages.items.properties.content.minLength

Section titled “properties.messages.items.properties.content.minLength”

readonly minLength: 1

properties.messages.items.properties.content.type

Section titled “properties.messages.items.properties.content.type”

readonly type: "string"

readonly role: object

properties.messages.items.properties.role.description

Section titled “properties.messages.items.properties.role.description”

readonly description: "The role of the author (e.g., 'user', 'assistant')."

properties.messages.items.properties.role.enum

Section titled “properties.messages.items.properties.role.enum”

readonly enum: readonly ["system", "user", "assistant"]

readonly required: readonly ["role", "content"]

readonly type: "object"

readonly minItems: 1

readonly type: "array"

readonly modelProfile: object

readonly description: "Name of the model profile to route within, as configured on the engine. Absent or 'auto' means every registered target, ranked by constraints and preferences alone. A profile is an application-defined, ordered allow-list of targets (provider instances bound to one model each); raw model or provider identifiers are never accepted here. An unknown profile name fails request validation."

readonly minLength: 1

readonly type: "string"

readonly preferences: object

properties.preferences.additionalProperties

Section titled “properties.preferences.additionalProperties”

readonly additionalProperties: true

readonly description: "Soft routing preferences used for deterministic provider ordering."

readonly properties: object

properties.preferences.properties.optimizeFor

Section titled “properties.preferences.properties.optimizeFor”

readonly optimizeFor: object

properties.preferences.properties.optimizeFor.description

Section titled “properties.preferences.properties.optimizeFor.description”

readonly description: "Primary optimization goal when multiple providers remain eligible."

properties.preferences.properties.optimizeFor.enum

Section titled “properties.preferences.properties.optimizeFor.enum”

readonly enum: readonly ["privacy", "latency", "cost", "balanced"]

readonly type: "object"

readonly prompt: object

readonly description: "A simple, single-turn text prompt used to trigger a response from the AI model."

readonly minLength: 1

readonly type: "string"

readonly requestId: object

readonly description: "Optional identifier for tracking or correlating this specific execution attempt."

readonly minLength: 1

readonly type: "string"

readonly schemaVersion: object

readonly const: "1.0"

readonly description: "Contract schema version used to interpret the request payload."

readonly speech: object

readonly additionalProperties: true

readonly description: "The text_to_speech payload. Required for text_to_speech and forbidden for every other kind."

readonly properties: object

readonly locale: object

properties.speech.properties.locale.description

Section titled “properties.speech.properties.locale.description”

readonly description: "BCP 47 tag of the language to speak, e.g. 'de-AT'."

properties.speech.properties.locale.minLength

Section titled “properties.speech.properties.locale.minLength”

readonly minLength: 1

readonly type: "string"

readonly localeMatch: object

properties.speech.properties.localeMatch.description

Section titled “properties.speech.properties.localeMatch.description”

readonly description: "'language' (default): the primary language subtag is a hard requirement and the region is a preference. 'exact': the full tag is a hard requirement."

properties.speech.properties.localeMatch.enum

Section titled “properties.speech.properties.localeMatch.enum”

readonly enum: readonly ["exact", "language"]

properties.speech.properties.localeMatch.title

Section titled “properties.speech.properties.localeMatch.title”

readonly title: "LocaleMatch"

readonly text: object

properties.speech.properties.text.description

Section titled “properties.speech.properties.text.description”

readonly description: "Plain text to speak. Markup such as SSML is out of scope."

properties.speech.properties.text.minLength

Section titled “properties.speech.properties.text.minLength”

readonly minLength: 1

readonly type: "string"

readonly voice: object

properties.speech.properties.voice.additionalProperties

Section titled “properties.speech.properties.voice.additionalProperties”

readonly additionalProperties: true

properties.speech.properties.voice.dependentRequired

Section titled “properties.speech.properties.voice.dependentRequired”

readonly dependentRequired: object

properties.speech.properties.voice.dependentRequired.id

Section titled “properties.speech.properties.voice.dependentRequired.id”

readonly id: readonly ["providerId"]

properties.speech.properties.voice.description

Section titled “properties.speech.properties.voice.description”

readonly description: "The voice to speak with: one catalog voice by providerId and id, or provider-neutral traits. A 'preferred' voice (default) shapes which voice speaks and is never a reason to fail; a 'required' one takes part in routing and is never relaxed silently."

readonly if: object

properties.speech.properties.voice.if.properties

Section titled “properties.speech.properties.voice.if.properties”

readonly properties: object

properties.speech.properties.voice.if.properties.requirement

Section titled “properties.speech.properties.voice.if.properties.requirement”

readonly requirement: object

properties.speech.properties.voice.if.properties.requirement.const

Section titled “properties.speech.properties.voice.if.properties.requirement.const”

readonly const: "required"

properties.speech.properties.voice.if.required

Section titled “properties.speech.properties.voice.if.required”

readonly required: readonly ["requirement"]

properties.speech.properties.voice.properties

Section titled “properties.speech.properties.voice.properties”

readonly properties: object

properties.speech.properties.voice.properties.gender

Section titled “properties.speech.properties.voice.properties.gender”

readonly gender: object

properties.speech.properties.voice.properties.gender.$ref

Section titled “properties.speech.properties.voice.properties.gender.$ref”

readonly $ref: "provider-dynamic-capabilities.schema.json#/$defs/voiceGender"

properties.speech.properties.voice.properties.id

Section titled “properties.speech.properties.voice.properties.id”

readonly id: object

properties.speech.properties.voice.properties.id.description

Section titled “properties.speech.properties.voice.properties.id.description”

readonly description: "A voice id read from listVoices(), never written by hand. Opaque, and meaningful only on providerId and the device that listed it, so a stored id can go stale: a 'preferred' one then falls back to the other traits."

properties.speech.properties.voice.properties.id.minLength

Section titled “properties.speech.properties.voice.properties.id.minLength”

readonly minLength: 1

properties.speech.properties.voice.properties.id.type

Section titled “properties.speech.properties.voice.properties.id.type”

readonly type: "string"

properties.speech.properties.voice.properties.providerId

Section titled “properties.speech.properties.voice.properties.providerId”

readonly providerId: object

properties.speech.properties.voice.properties.providerId.description

Section titled “properties.speech.properties.voice.properties.providerId.description”

readonly description: "The provider that listed id. Required with id, because voice ids share no namespace across providers."

properties.speech.properties.voice.properties.providerId.minLength

Section titled “properties.speech.properties.voice.properties.providerId.minLength”

readonly minLength: 1

properties.speech.properties.voice.properties.providerId.type

Section titled “properties.speech.properties.voice.properties.providerId.type”

readonly type: "string"

properties.speech.properties.voice.properties.requirement

Section titled “properties.speech.properties.voice.properties.requirement”

readonly requirement: object

properties.speech.properties.voice.properties.requirement.description

Section titled “properties.speech.properties.voice.properties.requirement.description”

readonly description: "'preferred' (default) or 'required'. A required voice must name an id or a trait."

properties.speech.properties.voice.properties.requirement.enum

Section titled “properties.speech.properties.voice.properties.requirement.enum”

readonly enum: readonly ["required", "preferred"]

properties.speech.properties.voice.properties.requirement.title

Section titled “properties.speech.properties.voice.properties.requirement.title”

readonly title: "RequirementLevel"

readonly then: object

properties.speech.properties.voice.then.anyOf

Section titled “properties.speech.properties.voice.then.anyOf”

readonly anyOf: readonly [{ required: readonly […]; }, { required: readonly […]; }]

readonly title: "SpeechVoice"

readonly type: "object"

readonly required: readonly ["text", "locale"]

readonly title: "SpeechInput"

readonly type: "object"

readonly task: object

readonly additionalProperties: true

readonly description: "A descriptor specifying the type of work to be performed. The kind selects which payload the request must carry."

readonly properties: object

readonly kind: object

properties.task.properties.kind.description

Section titled “properties.task.properties.kind.description”

readonly description: "The operation: 'text_to_text' (prompt-based text generation) or 'text_to_speech' (speech synthesis from text). A consumer built against an older revision rejects a kind it does not know through validation."

readonly enum: readonly ["text_to_text", "text_to_speech"]

readonly title: "TaskKind"

readonly required: readonly ["kind"]

readonly type: "object"

readonly telemetry: object

readonly additionalProperties: true

readonly description: "Execution preferences for tracking usage and performance metrics."

readonly properties: object

readonly consent: object

properties.telemetry.properties.consent.description

Section titled “properties.telemetry.properties.consent.description”

readonly description: "Whether the user consents to telemetry collection for this specific request."

properties.telemetry.properties.consent.type

Section titled “properties.telemetry.properties.consent.type”

readonly type: "boolean"

readonly level: object

properties.telemetry.properties.level.description

Section titled “properties.telemetry.properties.level.description”

readonly description: "The granularity of the collected metrics (off, minimal, or debug)."

properties.telemetry.properties.level.enum

Section titled “properties.telemetry.properties.level.enum”

readonly enum: readonly ["off", "minimal", "debug"]

readonly tags: object

properties.telemetry.properties.tags.additionalProperties

Section titled “properties.telemetry.properties.tags.additionalProperties”

readonly additionalProperties: object

properties.telemetry.properties.tags.additionalProperties.type

Section titled “properties.telemetry.properties.tags.additionalProperties.type”

readonly type: "string"

properties.telemetry.properties.tags.description

Section titled “properties.telemetry.properties.tags.description”

readonly description: "Optional key-value pairs for correlating telemetry data with specific features or users."

readonly type: "object"

readonly type: "object"

readonly required: readonly ["schemaVersion", "task"]

readonly title: "TaskRequest"

readonly type: "object"