openapi: 3.0.3 info: title: D-ID Agents Sessions API description: 'API for creating and managing interactive real-time AI agents that combine digital avatar streaming with large language models, RAG-based knowledge bases, and custom tools. Supports WebRTC and LiveKit-powered streaming sessions, conversation memory, chat export, and integration with third-party LLM providers. Enables face-to-face AI conversations at scale. ' version: 1.0.0 contact: url: https://www.d-id.com termsOfService: https://www.d-id.com/terms-of-use/ servers: - url: https://api.d-id.com description: D-ID Production API security: - basicAuth: [] - bearerAuth: [] tags: - name: Sessions description: Manage real-time streaming sessions for agents paths: /v2/agents/{agentId}/sessions: post: operationId: createsession summary: Create a session description: 'Establish a new streaming session for an Expressive Agent, returning session credentials required to connect via WebRTC or LiveKit. ' tags: - Sessions security: - basicAuth: [] - bearerAuth: [] - clientKeyAuth: [] parameters: - name: agentId in: path required: true description: Agent identifier. schema: type: string requestBody: required: false content: application/json: schema: $ref: '#/components/schemas/InitSessionV2Request' responses: '201': description: Session created successfully. content: application/json: schema: $ref: '#/components/schemas/SessionResponse' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': description: Agent not found. content: application/json: schema: $ref: '#/components/schemas/JsonError' /agents/{agentId}/sessions: get: operationId: listsessions summary: List sessions description: Retrieve all sessions for a specific agent. tags: - Sessions parameters: - name: agentId in: path required: true schema: type: string responses: '200': description: Array of session objects. content: application/json: schema: type: array items: $ref: '#/components/schemas/SessionResponse' '401': $ref: '#/components/responses/Unauthorized' /agents/{agentId}/sessions/{sessionId}: get: operationId: getsession summary: Get a session description: Retrieve details of a specific session. tags: - Sessions parameters: - name: agentId in: path required: true schema: type: string - name: sessionId in: path required: true schema: type: string responses: '200': description: Session object. content: application/json: schema: $ref: '#/components/schemas/SessionResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' components: responses: Unauthorized: description: Authentication failure. content: application/json: schema: $ref: '#/components/schemas/JsonError' example: kind: AuthorizationError description: user unauthenticated BadRequest: description: Bad request. content: application/json: schema: $ref: '#/components/schemas/JsonError' NotFound: description: Resource not found. content: application/json: schema: $ref: '#/components/schemas/JsonError' schemas: SessionResponse: type: object properties: id: type: string description: Session identifier. session_url: type: string format: uri description: URL for connecting to the session stream. session_token: type: string description: Authentication token for the session. interrupt_enabled: type: boolean description: Whether interrupt (barge-in) is enabled. InitSessionV2Request: type: object properties: chat_persist: type: boolean description: Whether to persist the chat history across sessions. default: false JsonError: type: object properties: kind: type: string example: AuthorizationError description: type: string example: user unauthenticated securitySchemes: basicAuth: type: http scheme: basic description: HTTP Basic Authentication using API key as username. bearerAuth: type: http scheme: bearer description: Bearer token authentication. clientKeyAuth: type: apiKey in: header name: Authorization description: Scoped client key for SDK embedding. externalDocs: description: D-ID Agents API Reference url: https://docs.d-id.com/reference/agents