Agent

Send Agent Message

Changed on

Start a Krea Agent session or send a follow-up turn by passing sessionId. Returns immediately while the Agent works in the background. Sessions are visible at the returned url and billed to the workspace's compute unit balance.

The Agent does not ask questions, and cost and permission prompts are approved automatically: include all requirements in the prompt. A session runs one turn at a time.

Attachments accept http(s) URLs and authorized Krea Files URIs (file:<uuid>). Model pins must be included in the workspace plan.

Pass customAgentId, from GET /agent/custom-agents, to start a new session with a workspace custom agent.

post/agent/send-message

Request

  • Base URL
    https://api.krea.ai
  • Auth
    HTTP bearer

Request body

object required
sessionId, string uuid

Omit to start a new session; pass an existing id to continue it

prompt, string
attachments, object[]

Transfer reference files that are not otherwise accessible to the Agent here. Usable URLs in the prompt, existing Krea context, and prior session files need not be repeated in attachments. The Agent does not inherit your conversation or attachments. Mentioning OpenAI file_ IDs in prompt text does not transfer their bytes, and those IDs cannot be converted to Krea file URIs.

model, 'openai/gpt-6.2-astra' | 'openai/gpt-6-astra' | 'openai/gpt-6.2-sol' | 'openai/gpt-6.1-sol' | 'openai/gpt-6.1-terra' | 'openai/gpt-6-sol' | 'openai/gpt-6-luna' | 'openai/gpt-5.6-sol' | 'openai/gpt-5.6-terra' | 'openai/gpt-5.6-luna' | 'openai/gpt-5.5' | 'anthropic/claude-opus-5.5' | 'anthropic/claude-opus-5' | 'anthropic/claude-fable-5.2' | 'anthropic/claude-fable-5.1' | 'anthropic/claude-fable-5' | 'anthropic/claude-opus-4.8' | 'anthropic/claude-sonnet-5' | 'anthropic/claude-sonnet-4.5' | 'google/gemini-4-carbon' | 'google/gemini-4-neon' | 'google/gemini-4-argon' | 'google/gemini-3.8-flash' | 'google/gemini-3.5-flash' | 'google/gemini-3.5-flash-lite' | 'google/gemini-3.1-pro-preview' | 'google/gemini-3.1-flash-lite' | 'google/gemini-2.5-flash-lite' | 'xai/grok-4.5' | 'zai/glm-5.2' | 'moonshotai/kimi-k3'

The LLM for this turn. Omit it for Auto, and send it on every turn that should use a specific model. Must be included in the workspace plan.

effort, 'fast' | 'default' | 'high' | 'xhigh'

The effort for this turn. Omit it for default, and send it on every turn that should use another effort.

name, string

Session name, new sessions only

customAgentId, string uuid

Start the new session with a custom agent from the workspace. New sessions only; a session keeps the custom agent it started with. Custom agents are available on Enterprise workspaces only.

desktopAppId, string uuid

An appId from list_desktop_apps. The Agent then works inside that desktop app for this turn.

Response

The Agent session result.

object required
sessionId, string required
threadId, string required
runId, string required
status, 'running' required
url, string required
model, string nullable required

The pinned LLM this turn runs on, or null when Auto picks it

effort, 'fast' | 'default' | 'high' | 'xhigh' required

The effort this turn runs at

Changes

    • info

      added the new google/gemini-4-neon enum value to the request property model

    • info

      added the optional property required_plan to the response with the status

    • info

      added the optional property required_plan to the response with the status

    5 more changes in this revision