TaskFlow
DashboardFreewriteWhiteboardsProjectsCRMTasksNotificationsSettingsAgent TowerAPI Docs
OpenClaw Docs
?

User

Member

Caricamento in corso...

Home
Progetti
Task
Notifiche
CRM

    OpenClaw

    Documentation Mirror

    Documentation Overview

    Docs

    Auth credential semantics
    Scheduled tasks
    Hooks
    Automation & tasks
    Standing orders
    Task flow
    Background tasks
    BlueBubbles
    Broadcast groups
    Channel routing
    Discord
    Feishu
    Google Chat
    Group messages
    Groups
    iMessage
    Chat channels
    IRC
    LINE
    Channel location parsing
    Matrix
    Matrix migration
    Matrix push rules for quiet previews
    Mattermost
    Microsoft Teams
    Nextcloud Talk
    Nostr
    Pairing
    QA channel
    QQ bot
    Signal
    Slack
    Synology Chat
    Telegram
    Tlon
    Channel troubleshooting
    Twitch
    WeChat
    WhatsApp
    Yuanbao
    Zalo
    Zalo personal
    CI pipeline
    ACP
    Agent
    Agents
    Approvals
    Backup
    Browser
    Channels
    Clawbot
    `openclaw commitments`
    Completion
    Config
    Configure
    Cron
    Daemon
    Dashboard
    Devices
    Directory
    DNS
    Docs
    Doctor
    Flows (redirect)
    Gateway
    Health
    Hooks
    CLI reference
    Inference CLI
    Logs
    MCP
    Memory
    Message
    Migrate
    Models
    Node
    Nodes
    Onboard
    Pairing
    Plugins
    Proxy
    QR
    Reset
    Sandbox CLI
    Secrets
    Security
    Sessions
    Setup
    Skills
    Status
    System
    `openclaw tasks`
    TUI
    Uninstall
    Update
    Voicecall
    Webhooks
    Wiki
    Active memory
    Agent runtime
    Agent loop
    Agent runtimes
    Agent workspace
    Gateway architecture
    Channel docking
    Inferred commitments
    Compaction
    Context
    Context engine
    Delegate architecture
    Dreaming
    Experimental features
    Features
    Markdown formatting
    Memory overview
    Builtin memory engine
    Honcho memory
    QMD memory engine
    Memory search
    Messages
    Model failover
    Model providers
    Models CLI
    Multi-agent routing
    OAuth
    OpenClaw App SDK
    Presence
    QA overview
    Matrix QA
    Command queue
    Steering queue
    Retry policy
    Session management
    Session pruning
    Session tools
    SOUL.md personality guide
    Streaming and chunking
    System prompt
    Timezones
    TypeBox
    Typing indicators
    Usage tracking
    Date and time
    Node + tsx crash
    Diagnostics flags
    Authentication
    Background exec and process tool
    Bonjour discovery
    Bridge protocol
    CLI backends
    Configuration — agents
    Configuration — channels
    Configuration — tools and custom providers
    Configuration
    Configuration examples
    Configuration reference
    Diagnostics export
    Discovery and transports
    Doctor
    Gateway lock
    Health checks
    Heartbeat
    Gateway runbook
    Local models
    Gateway logging
    Multiple gateways
    Network model
    OpenAI chat completions
    OpenResponses API
    OpenShell
    OpenTelemetry export
    Gateway-owned pairing
    Prometheus metrics
    Gateway protocol
    Remote access
    Remote gateway setup
    Sandbox vs tool policy vs elevated
    Sandboxing
    Secrets management
    Secrets apply plan contract
    Security audit checks
    Security
    Tailscale
    Tools invoke API
    Troubleshooting
    Trusted proxy auth
    Debugging
    Environment variables
    FAQ
    FAQ: first-run setup
    FAQ: models and auth
    GPT-5.5 / Codex agentic parity
    GPT-5.5 / Codex parity maintainer notes
    Help
    Scripts
    Testing
    Testing: live suites
    General troubleshooting
    OpenClaw
    Ansible
    Azure
    Bun (experimental)
    ClawDock
    Release channels
    DigitalOcean
    Docker
    Docker VM runtime
    exe.dev
    Fly.io
    GCP
    Hetzner
    Hostinger
    Install
    Installer internals
    Kubernetes
    macOS VMs
    Migration guide
    Migrating from Claude
    Migrating from Hermes
    Nix
    Node.js
    Northflank
    Oracle Cloud
    Podman
    Railway
    Raspberry Pi
    Render
    Uninstall
    Updating
    Logging
    Network
    Audio and voice notes
    Camera capture
    Image and media support
    Nodes
    Location command
    Media understanding
    Talk mode
    Node troubleshooting
    Voice wake
    Pi integration architecture
    Pi development workflow
    Android app
    Platforms
    iOS app
    Linux app
    Gateway on macOS
    Canvas
    Gateway lifecycle
    macOS dev setup
    Health checks (macOS)
    Menu bar icon
    macOS logging
    Menu bar
    Peekaboo bridge
    macOS permissions
    Remote control
    macOS signing
    Skills (macOS)
    Voice overlay
    Voice wake (macOS)
    WebChat (macOS)
    macOS IPC
    macOS app
    Windows
    Plugin internals
    Plugin architecture internals
    Building plugins
    Plugin bundles
    Codex Computer Use
    Codex harness
    Community plugins
    Plugin compatibility
    Google Meet plugin
    Plugin hooks
    Plugin manifest
    Memory LanceDB
    Memory wiki
    Message presentation
    Agent harness plugins
    Building channel plugins
    Channel turn kernel
    Plugin entry points
    Plugin SDK migration
    Plugin SDK overview
    Building provider plugins
    Plugin runtime helpers
    Plugin setup and config
    Plugin SDK subpaths
    Plugin testing
    Skill workshop plugin
    Voice call plugin
    Webhooks plugin
    Zalo personal plugin
    OpenProse
    Alibaba Model Studio
    Anthropic
    Arcee AI
    Azure Speech
    Amazon Bedrock
    Amazon Bedrock Mantle
    Chutes
    Claude Max API proxy
    Cloudflare AI gateway
    ComfyUI
    Deepgram
    Deepinfra
    DeepSeek
    ElevenLabs
    Fal
    Fireworks
    GitHub Copilot
    GLM (Zhipu)
    Google (Gemini)
    Gradium
    Groq
    Hugging Face (inference)
    Provider directory
    Inferrs
    Inworld
    Kilocode
    LiteLLM
    LM Studio
    MiniMax
    Mistral
    Model provider quickstart
    Moonshot AI
    NVIDIA
    Ollama
    OpenAI
    OpenCode
    OpenCode Go
    OpenRouter
    Perplexity
    Qianfan
    Qwen
    Runway
    SGLang
    StepFun
    Synthetic
    Tencent Cloud (TokenHub)
    Together AI
    Venice AI
    Vercel AI gateway
    vLLM
    Volcengine (Doubao)
    Vydra
    xAI
    Xiaomi MiMo
    Z.AI
    Default AGENTS.md
    Release policy
    API usage and costs
    Credits
    Device model database
    Full release validation
    Memory configuration reference
    OpenClaw App SDK API design
    Prompt caching
    Rich output protocol
    RPC adapters
    SecretRef credential surface
    Session management deep dive
    AGENTS.md template
    BOOT.md template
    BOOTSTRAP.md template
    HEARTBEAT.md template
    IDENTITY template
    SOUL.md template
    TOOLS.md template
    USER template
    Tests
    Token use and costs
    Transcript hygiene
    Onboarding reference
    Contributing to the threat model
    Threat model (MITRE ATLAS)
    Formal verification (security models)
    Network proxy
    Agent bootstrapping
    Docs directory
    Getting started
    Docs hubs
    OpenClaw lore
    Onboarding (macOS app)
    Onboarding overview
    Personal assistant setup
    Setup
    Showcase
    Onboarding (CLI)
    CLI automation
    CLI setup reference
    ACP agents
    ACP agents — setup
    Agent send
    apply_patch tool
    Brave search
    Browser (OpenClaw-managed)
    Browser control API
    Browser troubleshooting
    Browser login
    WSL2 + Windows + remote Chrome CDP troubleshooting
    BTW side questions
    ClawHub
    Code execution
    Creating skills
    Diffs
    DuckDuckGo search
    Elevated mode
    Exa search
    Exec tool
    Exec approvals
    Exec approvals — advanced
    Firecrawl
    Gemini search
    Grok search
    Image generation
    Tools and plugins
    Kimi search
    LLM task
    Lobster
    Tool-loop detection
    Media overview
    MiniMax search
    Multi-agent sandbox and tools
    Music generation
    Ollama web search
    PDF tool
    Perplexity search
    Plugins
    Reactions
    SearXNG search
    Skills
    Skills config
    Slash commands
    Sub-agents
    Tavily
    Thinking levels
    Tokenjuice
    Trajectory bundles
    Text-to-speech
    Video generation
    Web search
    Web fetch
    Linux server
    Control UI
    Dashboard
    Web
    TUI
    WebChat

    OpenAPI Specs

    openapi
    TaskFlow
    docs/openclaw
    Original Docs

    Real-time Synchronized Documentation

    Last sync: 01/05/2026 07:05:24

    Note: This content is mirrored from docs.openclaw.ai and is subject to their terms and conditions.

    OpenClaw Docs

    v2.4.0 Production

    Last synced: Today, 22:00

    Technical reference for the OpenClaw framework. Real-time synchronization with the official documentation engine.

    Use this file to discover all available pages before exploring further.

    OpenAI chat completions

    OpenClaw’s Gateway can serve a small OpenAI-compatible Chat Completions endpoint.

    This endpoint is disabled by default. Enable it in config first.

    • text
      POST /v1/chat/completions
    • Same port as the Gateway (WS + HTTP multiplex):
      text
      http://<gateway-host>:<port>/v1/chat/completions

    When the Gateway’s OpenAI-compatible HTTP surface is enabled, it also serves:

    • text
      GET /v1/models
    • text
      GET /v1/models/{id}
    • text
      POST /v1/embeddings
    • text
      POST /v1/responses

    Under the hood, requests are executed as a normal Gateway agent run (same codepath as

    text
    openclaw agent
    ), so routing/permissions/config match your Gateway.

    Authentication

    Uses the Gateway auth configuration.

    Common HTTP auth paths:

    • shared-secret auth (
      text
      gateway.auth.mode="token"
      or
      text
      "password"
      ):
      text
      Authorization: Bearer <token-or-password>
    • trusted identity-bearing HTTP auth (
      text
      gateway.auth.mode="trusted-proxy"
      ): route through the configured identity-aware proxy and let it inject the required identity headers
    • private-ingress open auth (
      text
      gateway.auth.mode="none"
      ): no auth header required

    Notes:

    • When
      text
      gateway.auth.mode="token"
      , use
      text
      gateway.auth.token
      (or
      text
      OPENCLAW_GATEWAY_TOKEN
      ).
    • When
      text
      gateway.auth.mode="password"
      , use
      text
      gateway.auth.password
      (or
      text
      OPENCLAW_GATEWAY_PASSWORD
      ).
    • When
      text
      gateway.auth.mode="trusted-proxy"
      , the HTTP request must come from a configured trusted proxy source; same-host loopback proxies require explicit
      text
      gateway.auth.trustedProxy.allowLoopback = true
      .
    • If
      text
      gateway.auth.rateLimit
      is configured and too many auth failures occur, the endpoint returns
      text
      429
      with
      text
      Retry-After
      .

    Security boundary (important)

    Treat this endpoint as a full operator-access surface for the gateway instance.

    • HTTP bearer auth here is not a narrow per-user scope model.
    • A valid Gateway token/password for this endpoint should be treated like an owner/operator credential.
    • Requests run through the same control-plane agent path as trusted operator actions.
    • There is no separate non-owner/per-user tool boundary on this endpoint; once a caller passes Gateway auth here, OpenClaw treats that caller as a trusted operator for this gateway.
    • For shared-secret auth modes (
      text
      token
      and
      text
      password
      ), the endpoint restores the normal full operator defaults even if the caller sends a narrower
      text
      x-openclaw-scopes
      header.
    • Trusted identity-bearing HTTP modes (for example trusted proxy auth or
      text
      gateway.auth.mode="none"
      ) honor
      text
      x-openclaw-scopes
      when present and otherwise fall back to the normal operator default scope set.
    • If the target agent policy allows sensitive tools, this endpoint can use them.
    • Keep this endpoint on loopback/tailnet/private ingress only; do not expose it directly to the public internet.

    Auth matrix:

    • text
      gateway.auth.mode="token"
      or
      text
      "password"
      +
      text
      Authorization: Bearer ...
      • proves possession of the shared gateway operator secret
      • ignores narrower
        text
        x-openclaw-scopes
      • restores the full default operator scope set:
        text
        operator.admin
        ,
        text
        operator.approvals
        ,
        text
        operator.pairing
        ,
        text
        operator.read
        ,
        text
        operator.talk.secrets
        ,
        text
        operator.write
      • treats chat turns on this endpoint as owner-sender turns
    • trusted identity-bearing HTTP modes (for example trusted proxy auth, or
      text
      gateway.auth.mode="none"
      on private ingress)
      • authenticate some outer trusted identity or deployment boundary
      • honor
        text
        x-openclaw-scopes
        when the header is present
      • fall back to the normal operator default scope set when the header is absent
      • only lose owner semantics when the caller explicitly narrows scopes and omits
        text
        operator.admin

    See Security and Remote access.

    Agent-first model contract

    OpenClaw treats the OpenAI

    text
    model
    field as an agent target, not a raw provider model id.

    • text
      model: "openclaw"
      routes to the configured default agent.
    • text
      model: "openclaw/default"
      also routes to the configured default agent.
    • text
      model: "openclaw/<agentId>"
      routes to a specific agent.

    Optional request headers:

    • text
      x-openclaw-model: <provider/model-or-bare-id>
      overrides the backend model for the selected agent.
    • text
      x-openclaw-agent-id: <agentId>
      remains supported as a compatibility override.
    • text
      x-openclaw-session-key: <sessionKey>
      fully controls session routing.
    • text
      x-openclaw-message-channel: <channel>
      sets the synthetic ingress channel context for channel-aware prompts and policies.

    Compatibility aliases still accepted:

    • text
      model: "openclaw:<agentId>"
    • text
      model: "agent:<agentId>"

    Enabling the endpoint

    Set

    text
    gateway.http.endpoints.chatCompletions.enabled
    to
    text
    true
    :

    json5
    { gateway: { http: { endpoints: { chatCompletions: { enabled: true }, }, }, }, }

    Disabling the endpoint

    Set

    text
    gateway.http.endpoints.chatCompletions.enabled
    to
    text
    false
    :

    json5
    { gateway: { http: { endpoints: { chatCompletions: { enabled: false }, }, }, }, }

    Session behavior

    By default the endpoint is stateless per request (a new session key is generated each call).

    If the request includes an OpenAI

    text
    user
    string, the Gateway derives a stable session key from it, so repeated calls can share an agent session.

    Why this surface matters

    This is the highest-leverage compatibility set for self-hosted frontends and tooling:

    • Most Open WebUI, LobeChat, and LibreChat setups expect
      text
      /v1/models
      .
    • Many RAG systems expect
      text
      /v1/embeddings
      .
    • Existing OpenAI chat clients can usually start with
      text
      /v1/chat/completions
      .
    • More agent-native clients increasingly prefer
      text
      /v1/responses
      .

    Model list and agent routing

    Streaming (SSE)

    Set

    text
    stream: true
    to receive Server-Sent Events (SSE):

    • text
      Content-Type: text/event-stream
    • Each event line is
      text
      data: <json>
    • Stream ends with
      text
      data: [DONE]

    Open WebUI quick setup

    For a basic Open WebUI connection:

    • Base URL:
      text
      http://127.0.0.1:18789/v1
    • Docker on macOS base URL:
      text
      http://host.docker.internal:18789/v1
    • API key: your Gateway bearer token
    • Model:
      text
      openclaw/default

    Expected behavior:

    • text
      GET /v1/models
      should list
      text
      openclaw/default
    • Open WebUI should use
      text
      openclaw/default
      as the chat model id
    • If you want a specific backend provider/model for that agent, set the agent's normal default model or send
      text
      x-openclaw-model

    Quick smoke:

    bash
    curl -sS http://127.0.0.1:18789/v1/models \ -H 'Authorization: Bearer YOUR_TOKEN'

    If that returns

    text
    openclaw/default
    , most Open WebUI setups can connect with the same base URL and token.

    Examples

    Non-streaming:

    bash
    curl -sS http://127.0.0.1:18789/v1/chat/completions \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "model": "openclaw/default", "messages": [{"role":"user","content":"hi"}] }'

    Streaming:

    bash
    curl -N http://127.0.0.1:18789/v1/chat/completions \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -H 'x-openclaw-model: openai/gpt-5.4' \ -d '{ "model": "openclaw/research", "stream": true, "messages": [{"role":"user","content":"hi"}] }'

    List models:

    bash
    curl -sS http://127.0.0.1:18789/v1/models \ -H 'Authorization: Bearer YOUR_TOKEN'

    Fetch one model:

    bash
    curl -sS http://127.0.0.1:18789/v1/models/openclaw%2Fdefault \ -H 'Authorization: Bearer YOUR_TOKEN'

    Create embeddings:

    bash
    curl -sS http://127.0.0.1:18789/v1/embeddings \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -H 'x-openclaw-model: openai/text-embedding-3-small' \ -d '{ "model": "openclaw/default", "input": ["alpha", "beta"] }'

    Notes:

    • text
      /v1/models
      returns OpenClaw agent targets, not raw provider catalogs.
    • text
      openclaw/default
      is always present so one stable id works across environments.
    • Backend provider/model overrides belong in
      text
      x-openclaw-model
      , not the OpenAI
      text
      model
      field.
    • text
      /v1/embeddings
      supports
      text
      input
      as a string or array of strings.

    Related

    • Configuration reference
    • OpenAI

    © 2024 TaskFlow Mirror

    Powered by TaskFlow Sync Engine