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

# redeem a script session code

> Exchanges the single-use code the get_api_session tool returned for a bearer token that lasts 30 minutes and acts in that connection's workspace. The code is the credential: no Authorization header, valid 10 minutes, one redemption.



## OpenAPI

````yaml /openapi.json post /sessions/redeem
openapi: 3.1.0
info:
  title: Eversince API
  version: '1'
  description: >-
    Every Eversince tool as one POST call, plus the routes beside them: the tool
    list, account and keys, uploads, webhooks and models. The prose is at
    https://docs.eversince.ai.
servers:
  - url: https://eversince.ai/api/v1
security:
  - bearer: []
tags:
  - name: Discovery
    description: The tool list, the same on the MCP server, the REST API and the CLI.
  - name: Workspace
    description: Jobs, balances, settings, templates, skills and the overview.
  - name: Library
    description: >-
      Items, search, import, reading media, comments, boards, calendars, the
      brand kit and public links.
  - name: Timeline
    description: 'Video editing: timelines, clips, captions, sound, language and rendering.'
  - name: Canvas
    description: 'Still editing: canvases, slides, layers and rendering.'
  - name: Generation
    description: Image, video and audio generation, upscaling, cutouts and models.
  - name: Research
    description: 'What platforms publish: pulling and keeping posts.'
  - name: Account
    description: Balances, keys, workspaces and script sessions.
  - name: Uploads
    description: Files into the library by presigned upload or by URL.
  - name: Webhooks
    description: Job results posted to a URL as they complete.
  - name: Models
    description: Generation models and cost estimates.
paths:
  /sessions/redeem:
    post:
      tags:
        - Account
      summary: redeem a script session code
      description: >-
        Exchanges the single-use code the get_api_session tool returned for a
        bearer token that lasts 30 minutes and acts in that connection's
        workspace. The code is the credential: no Authorization header, valid 10
        minutes, one redemption.
      operationId: redeem_session
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: string
                  description: esx_…
              required:
                - code
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    const: true
                  token:
                    type: string
                  expires_at:
                    type: string
                  workspace_id:
                    type: string
                required:
                  - ok
                  - token
                  - expires_at
                  - workspace_id
        '400':
          description: Invalid, used or expired code.
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    const: false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      retryable:
                        type: boolean
        '500':
          description: internal_error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      status:
                        type: number
                    required:
                      - code
                      - message
                      - status
                required:
                  - error
        '503':
          description: 'unavailable: retry shortly.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      status:
                        type: number
                    required:
                      - code
                      - message
                      - status
                required:
                  - error
      security: []
components:
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: >-
        An API key (es_live_…) from Settings, under API keys, or an OAuth access
        token.

````