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

# Get Agent Session

> Read the current status, latest assistant text, and deliverables of a session owned by the caller in the authenticated workspace. Does not wait for completion.



## OpenAPI

````yaml https://api.krea.ai/openapi.json get /agent/session/{sessionId}
openapi: 3.1.0
info:
  title: Krea API
  version: v1
servers:
  - url: https://api.krea.ai
    description: Krea API
security:
  - bearerAuth: []
tags:
  - name: General
    description: Core API operations including job management and billing information
  - name: Krea
    description: Krea-owned generation models including Krea 2
  - name: Assets
    description: >-
      Asset management endpoints for uploading and managing images, videos,
      audio files, and 3D models
  - name: Styles
    description: Style (LoRA) generation and management endpoints
  - name: Node Apps
    description: Executing custom node apps built in our nodes tool
  - name: Image
    description: Image generation endpoints
  - name: Image Enhance
    description: Image enhance endpoints
  - name: Video
    description: Video generation endpoints
  - name: Video Enhance
    description: Video enhance and upscale endpoints
  - name: 3D
    description: 3D model generation endpoints
  - name: Audio
    description: Speech and audio generation endpoints
  - name: Usage
    description: Workspace usage reporting
  - name: Agent
    description: Krea Agent sessions
  - name: Utilities
    description: Miscellaneous utility endpoints
paths:
  /agent/session/{sessionId}:
    get:
      tags:
        - Agent
      summary: Get Agent Session
      description: >-
        Read the current status, latest assistant text, and deliverables of a
        session owned by the caller in the authenticated workspace. Does not
        wait for completion.
      parameters:
        - in: path
          name: sessionId
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            description: Session id returned by send_agent_message
          required: true
          description: Session id returned by send_agent_message
      responses:
        '200':
          description: The Agent session result.
          content:
            application/json:
              schema:
                type: object
                properties:
                  sessionId:
                    type: string
                  threadId:
                    type: string
                  runId:
                    type: string
                  status:
                    type: string
                    enum:
                      - not_started
                      - running
                      - completed
                      - failed
                      - cancelled
                  finished:
                    type: boolean
                    description: True once status is completed, failed, or cancelled
                  text:
                    type: string
                    description: Latest assistant message text
                  media:
                    type: array
                    description: >-
                      Media the session produced — the deliverables the agent
                      presented, plus its other generations while a turn is
                      running. Order is not significant. Each item is {jobId,
                      mediaKind?} for a generation (fetch it with get_job),
                      {url} for rehosted media, or {uri, name, mimeType} for a
                      Krea file (read it with read_files)
                    items:
                      type: object
                      properties:
                        jobId:
                          type: string
                        mediaKind:
                          type: string
                          enum:
                            - image
                            - video
                            - audio
                            - 3d
                        url:
                          type: string
                        uri:
                          type: string
                        name:
                          type: string
                        mimeType:
                          type: string
                  error:
                    type: string
                  url:
                    type: string
                    description: The session in the Krea app
                required:
                  - sessionId
                  - threadId
                  - status
                  - finished
                  - text
                  - media
                  - url
        '400':
          description: Invalid JSON body.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  allowedModels:
                    type: array
                    items:
                      type: string
                required:
                  - error
                additionalProperties: false
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  allowedModels:
                    type: array
                    items:
                      type: string
                required:
                  - error
                additionalProperties: false
        '402':
          description: Insufficient compute unit balance or free message limit reached.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  allowedModels:
                    type: array
                    items:
                      type: string
                required:
                  - error
                additionalProperties: false
        '403':
          description: The requested model is not included in the workspace plan.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  allowedModels:
                    type: array
                    items:
                      type: string
                required:
                  - error
                additionalProperties: false
        '404':
          description: Session or attachment not found or not accessible.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  allowedModels:
                    type: array
                    items:
                      type: string
                required:
                  - error
                additionalProperties: false
        '409':
          description: A turn is already in progress.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  allowedModels:
                    type: array
                    items:
                      type: string
                required:
                  - error
                additionalProperties: false
        '422':
          description: Invalid input or desktop app unavailable.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  allowedModels:
                    type: array
                    items:
                      type: string
                required:
                  - error
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      scheme: bearer
      bearerFormat: Bearer
      type: http

````

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