Agent App API
Agent applications provide conversational service APIs with session history, tool use, and file inputs.
Base URL
Code
https://api-platform.dify.dev/v1Authentication
The Service API uses API-Key authentication. Strongly recommend storing your API Key on the server-side, not shared or stored on the client-side.
For all API requests, include your API Key in the Authorization HTTP Header.
Code
Authorization: Bearer {API_KEY}Send Chat Message
POST
/chat-messagesquerystringUser message sent to the agent.
inputsobjectVariables referenced by the agent instructions.
conversation_idstringOptional conversation to continue.