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

# Retrieve a session



## OpenAPI

````yaml specs/agents.yaml GET /v1/sessions/{session_id}
openapi: 3.0.3
info:
  title: AssemblyAI Voice Agents API
  description: >
    REST API for creating and managing reusable voice agents. An agent stores
    its

    system prompt, greeting, voice, and tools server-side, so you can deploy the
    same

    agent across the WebSocket API, a browser, or Twilio by referencing its
    `id`. See

    [Create an agent](/voice-agents/voice-agent-api/create-agent)

    for a guided walkthrough.
  version: 1.0.0
  termsOfService: https://www.assemblyai.com/legal/terms-of-service
  contact:
    name: API Support
    email: support@assemblyai.com
    url: https://www.assemblyai.com/docs/
servers:
  - url: https://agents.assemblyai.com
    description: Production server
    x-fern-server-name: Default
security: []
paths:
  /v1/sessions/{session_id}:
    parameters:
      - name: session_id
        in: path
        required: true
        description: The session's unique ID.
        schema:
          type: string
          example: sess_9a648a2ab75747a9a597ba046ced3e13
    get:
      summary: Retrieve a session
      description: >
        Retrieve a single session by ID, including its artifacts (recording,
        conversation

        timeline, and metadata) as short-lived pre-signed download URLs.
      operationId: getSession
      responses:
        '200':
          description: The session record with artifacts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - apiKey: []
components:
  schemas:
    SessionResponse:
      type: object
      required:
        - id
        - status
      properties:
        id:
          type: string
          description: Unique ID of the session.
          example: sess_9a648a2ab75747a9a597ba046ced3e13
        agent_id:
          type: string
          nullable: true
          description: Agent the session ran with. Null when no stored agent was used.
        status:
          type: string
          description: Lifecycle status of the session, e.g. `completed`.
          example: completed
        public_close_reason:
          type: string
          nullable: true
          description: Why the session ended, when known.
          example: client_end
        duration_seconds:
          type: number
          nullable: true
          description: Session length in seconds. Null while the session is active.
          example: 42.6
        config:
          type: object
          nullable: true
          description: Session configuration captured when the session started.
          additionalProperties: true
        created_at:
          type: string
          format: date-time
          nullable: true
          description: When the session was created.
        ended_at:
          type: string
          format: date-time
          nullable: true
          description: When the session ended. Null while the session is active.
        artifacts:
          type: array
          description: >-
            Recording, timeline, and metadata produced by the session. Empty
            until the session completes.
          items:
            $ref: '#/components/schemas/SessionArtifact'
    SessionArtifact:
      type: object
      required:
        - type
        - url
        - content_type
      properties:
        type:
          type: string
          description: Artifact kind.
          enum:
            - audio
            - timeline
            - metadata
        url:
          type: string
          description: >-
            Pre-signed download URL. Expires after a short TTL; re-fetch the
            session for a fresh link.
        content_type:
          type: string
          description: MIME type of the artifact.
          example: audio/ogg
    Error:
      type: object
      properties:
        detail:
          type: string
          description: Error message describing what went wrong.
          example: Unauthorized
  responses:
    Unauthorized:
      description: >-
        Unauthorized. Invalid or missing API key, or the key is not entitled for
        Voice Agents.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The agent was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Your AssemblyAI API key in the `Authorization` header. The raw key works
        directly; a `Bearer ` prefix is also accepted.

````