> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentscope.io/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> For AgentScope Python, use https://docs.agentscope.io/stable/en/index for new projects. For existing projects, check the installed agentscope version and use matching versioned documentation.
> The /latest/ alias points to the newest documentation and may move ahead of /stable/ when a development version exists. Do not mix AgentScope 1.x and 2.x APIs.
> State the AgentScope version when providing installation commands or code examples. ReMe uses its own continuously updated /reme/latest/ documentation.

# Start a realtime session from a WebRTC offer

> Negotiate one browser peer connection for a persisted session.



## OpenAPI

````yaml /en/versions/2.0.10/deploy/openapi.json post /realtime/sessions/{session_id}/offer
openapi: 3.1.0
info:
  title: AgentScope
  version: 2.0.10
servers: []
security: []
paths:
  /realtime/sessions/{session_id}/offer:
    post:
      tags:
        - realtime
      summary: Start a realtime session from a WebRTC offer
      description: Negotiate one browser peer connection for a persisted session.
      operationId: create_realtime_offer_realtime_sessions__session_id__offer_post
      parameters:
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            title: Session Id
        - name: x-user-id
          in: header
          required: true
          schema:
            type: string
            description: >-
              Caller's user ID. Temporary header-based identity; will be
              replaced by JWT auth.
            title: X-User-Id
          description: >-
            Caller's user ID. Temporary header-based identity; will be replaced
            by JWT auth.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RealtimeOfferRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RealtimeOfferResponse'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    RealtimeOfferRequest:
      properties:
        agent_id:
          type: string
          title: Agent Id
          description: The agent that owns the session.
        sdp:
          type: string
          title: Sdp
          description: The browser's SDP offer.
        type:
          type: string
          const: offer
          title: Type
          default: offer
      type: object
      required:
        - agent_id
        - sdp
      title: RealtimeOfferRequest
      description: A browser WebRTC offer for a persisted session.
    RealtimeOfferResponse:
      properties:
        sdp:
          type: string
          title: Sdp
          description: The server's SDP answer.
        type:
          type: string
          const: answer
          title: Type
          default: answer
      type: object
      required:
        - sdp
      title: RealtimeOfferResponse
      description: The server WebRTC answer.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.