Agent

Creates a chat completion with an agent (Vercel AI SDK compatible)

Changed on

Creates a model response using Vercel AI SDK compatible UIMessage format

post/agent/v1/chat/completions

Request

  • Base URL
    https://api.langdock.com
  • URL
    https://api.langdock.com/agent/v1/chat/completions
  • Auth
    HTTP bearer

Request body

agentIdstring required

ID of an existing agent to use

streamboolean
imageResponseFormat'url' | 'b64_json'

Response format for images generated by the agent. "url" returns a signed URL, "b64_json" returns base64-encoded image data.

Response

Successful chat completion

idstring required
role'assistant' required
partsobject[] required
outputunknown

Changes