---
title: "Create agent input"
method: POST
path: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/inputs"
tags: ["Agents"]
---

# Create agent input

`POST /orgs/{orgID}/projects/{projectID}/agents/{agentID}/inputs`

## Request

- Base URL: `https://api.omnara.com/v1`
- URL: `https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/inputs`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `__Host-omnara_session` and API key in header `X-Omnara-Csrf`

Sends a message to an agent and returns the stored input. Queued messages (the default) wait until the agent is ready for new work; steering messages reach it at its next model call. Set scheduled_for to hold the message until a future time: it is stored with state scheduled, listed with the waiting backlog, and joins the back of its delivery backlog once that time passes.

## Path parameters

- `orgID` string, required
- `projectID` string, required
- `agentID` string, required

## Headers

- `Idempotency-Key` string
- `traceparent` string

## Request body

- CreateAgentInputRequest
  - `content_blocks` CreateAgentInputContentBlock[], required: At most 20 inline media blocks per submission, each holding up to 10 MiB of decoded media and up to 24 MiB decoded across the submission. Non-media blocks may hold up to 1 MiB combined. The whole request body is capped at 48 MiB.
    - union
      - TextContentBlock
        - `type` 'text', required: text: a plain-text block.
        - `text` string, required: Block text: the message in agent inputs, or text from the model or a tool in events.
        - `metadata` ContentBlockMetadata: Key-value metadata. omnara_ keys are reserved.
      - InlineMediaContentBlock: Files that pass validation are stored as artifacts. Model input always includes the artifact ID, whether or not the file contents can be sent directly. Text media must contain valid UTF-8 and is sent as text. Images and PDFs are sent directly when supported by the configured provider and model; unsupported combinations are rejected. Other binary documents are sent directly only to OpenAI Responses models with file input support. Chat Completions and Anthropic Messages receive the artifact ID and the filename, if provided, instead of the contents of those documents. Audio (WAV, MP3, M4A, FLAC) is sent directly only to Chat Completions models whose input modalities explicitly include audio, and M4A and FLAC only through OpenRouter; otherwise the model receives the artifact ID and the filename.
        - `type` 'media', required: media: a base64-encoded file in data.
        - `media_type` 'image/png' | 'image/jpeg' | 'image/gif' | 'image/webp' | 'audio/wav' | 'audio/mpeg' | 'audio/mp4' | 'audio/flac' | 'application/pdf' | 'text/plain' | 'text/markdown' | 'text/csv' | 'text/tab-separated-values' | 'text/x-iif' | 'application/msword' | 'application/rtf' | 'application/vnd.oasis.opendocument.text' | 'application/vnd.apple.pages' | 'application/vnd.apple.keynote' | 'application/vnd.apple.iwork' | 'application/vnd.ms-powerpoint' | 'application/vnd.ms-excel' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | 'application/vnd.openxmlformats-officedocument.presentationml.presentation' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', required: MIME type of the file in data.
        - `filename` string: Filename saved with the stored file and shown to models that can't read the file directly.
        - `data` string, byte, required: Base64-encoded file bytes. For text media types, the decoded bytes must be valid UTF-8.
        - `metadata` ContentBlockMetadata: Key-value metadata. omnara_ keys are reserved.
  - `delivery_mode` 'queued' | 'steering': queued (default) waits until the agent is free; steering reaches it at its next model call.
  - `scheduled_for` string, date-time: Future time at which the message joins the agent's backlog. Until then the input has state scheduled and can be canceled. An agent holds at most 25 scheduled inputs. Delivery follows within about a minute of this time, using delivery_mode. Must be in the future and at most 90 days away.
  - `cancel_open_interactions` boolean: Only valid when delivery_mode is steering and scheduled_for is omitted. When true, atomically cancels open interactions associated with the current turn's unfinished tool calls before creating the steering input. Their parent tool calls complete as canceled; the turn, runtime, and unrelated tool calls are preserved.
  - `actor` ExternalActorParams: External actor to attribute this input to, upserted by (provider_tenant_id, provider_user_id) atomically with the input; a rejected request writes no actor. Only allowed for non-user principals; requests authenticated as a user must omit it and are attributed to the user's omnara actor. When a non-user request omits it, the input has no actor attribution.
    - `provider_tenant_id` string: Your tenant or namespace for the user. With provider_user_id, identifies the actor.
    - `provider_user_id` string, required: The user's ID in your system. With provider_tenant_id, identifies the actor.
    - `display_name` string: Display name for the actor.
    - `metadata` Metadata: Key-value attributes for the actor. Replaces stored metadata when sent.

## Response `200`

Existing agent input returned.

- AgentInputEnvelope
  - `agent_input` AgentInput, required
    - `id` string, required
    - `agent_id` string, required
    - `state` 'scheduled' | 'received' | 'resolved' | 'canceled', required: scheduled while a content input waits for its scheduled_for time, received once it is waiting for the agent, resolved when the agent has processed it, or canceled.
    - `delivery_mode` 'queued' | 'steering' | 'immediate', required
    - `input_kind` 'content' | 'control' | 'interaction_response' | 'config_change', required
    - `actor_id` string: Actor this input is attributed to. Absent when the input has no actor attribution.
    - `input_idempotency_key` string: Idempotency key supplied when this content input was created. Absent for other input kinds.
    - `content_blocks` AgentInputContentBlock[]
      - union
        - TextContentBlock
          - `type` 'text', required: text: a plain-text block.
          - `text` string, required: Block text: the message in agent inputs, or text from the model or a tool in events.
          - `metadata` ContentBlockMetadata: Key-value metadata. omnara_ keys are reserved.
        - MediaRefContentBlock
          - `type` 'media_ref', required
          - `artifact_id` string, required
          - `exclude_from_model_context` boolean: Whether the referenced artifact is excluded from later model context.
          - `metadata` ContentBlockMetadata: Arbitrary key-value labels. Keys beginning with `omnara_` are reserved for Omnara and may affect product behavior; use them only when intentionally invoking Omnara-defined behavior.
    - `queued_at` string, date-time, required
    - `scheduled_for` string, date-time: Time this input was scheduled to join the agent's backlog. Present only for content inputs created with scheduled_for; it stays set after the input is released.

## Other responses

- `201`: Agent input created.
- `400`: The request was invalid.
- `401`: Authentication is required or invalid.
- `403`: The authenticated principal is not authorized.
- `404`: The requested resource was not found or is not visible.
- `409`: The request conflicts with current resource state or idempotency history.
- `503`: The service dependency required to satisfy the request is unavailable.
- `4XX`: Any other client error. The body carries the shared Error envelope restricted to client error codes; statuses with a dedicated response above are documented precisely.
- `5XX`: Any other server error. The body carries the shared Error envelope restricted to server error codes.

## Changes

- **2026-12-01** `5d8b0aabd49b`: 1 info
  - added the new optional `header` request parameter `traceparent`
- **2026-11-20** `2df2bd14f59d`: 4 info
  - added the new `audio/flac` enum value to the request property `content_blocks/items/oneOf[#/components/schemas/InlineMediaContentBlock]/media_type`
  - added the new `audio/mp4` enum value to the request property `content_blocks/items/oneOf[#/components/schemas/InlineMediaContentBlock]/media_type`
  - added the new `audio/mpeg` enum value to the request property `content_blocks/items/oneOf[#/components/schemas/InlineMediaContentBlock]/media_type`
  - added the new `audio/wav` enum value to the request property `content_blocks/items/oneOf[#/components/schemas/InlineMediaContentBlock]/media_type`
- **2026-11-19** `addc015e112a`: 8 warning, 3 info
  - added the new `canceled` enum value to the `agent_input/state` response property for the response status `200`
  - added the new `canceled` enum value to the `agent_input/state` response property for the response status `201`
  - added the new `received` enum value to the `agent_input/state` response property for the response status `200`
  - added the new `received` enum value to the `agent_input/state` response property for the response status `201`
  - …7 more
- …earlier changes not shown

[Operation history](https://skmtc.dev/omnara/apis/omnara-api-2/changes/orgs/:orgID/projects/:projectID/agents/:agentID/inputs/post.md)

---

[API](https://skmtc.dev/omnara/apis/omnara-api-2.md) - [All operations](https://skmtc.dev/omnara/apis/omnara-api-2/llms.txt) - [OpenAPI document](https://skmtc.dev/omnara/apis/omnara-api-2/revisions/343aebb1dff1?raw)
