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

# Open a session

> Pre-deposit a budget for streaming micropayments to a service. Sign vouchers via /sessions/:id/voucher for each call. Close via /sessions/:id/close.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/mpp/sessions
openapi: 3.1.0
info:
  title: Sly API
  description: >-
    The Agentic Economy Platform — stablecoin payments, agent wallets,
    multi-protocol commerce, and AI agent orchestration.
  version: 1.0.0
  contact:
    name: Sly
    url: https://getsly.ai
    email: support@getsly.ai
servers:
  - url: https://api.getsly.ai/v1
    description: Production
  - url: https://sandbox.getsly.ai/v1
    description: Sandbox
security:
  - bearerAuth: []
paths:
  /v1/mpp/sessions:
    post:
      tags:
        - MPP
      summary: Open a session
      description: >-
        Pre-deposit a budget for streaming micropayments to a service. Sign
        vouchers via /sessions/:id/voucher for each call. Close via
        /sessions/:id/close.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                service_url:
                  type: string
                  format: uri
                deposit_amount:
                  type: number
                  exclusiveMinimum: 0
                currency:
                  type: string
                  default: USDC
                agent_id:
                  type: string
                  format: uuid
                wallet_id:
                  type: string
                  format: uuid
              required:
                - service_url
                - deposit_amount
                - agent_id
                - wallet_id
      responses:
        '201':
          description: Session opened
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/MPPSession'
                required:
                  - data
        '402':
          description: Wallet balance insufficient for deposit
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - properties:
                      error:
                        type: string
                      code:
                        type: string
                      details: {}
      security:
        - bearerAuth: []
components:
  schemas:
    MPPSession:
      type: object
      properties:
        id:
          type: string
        service_url:
          type: string
          format: uri
        agent_id:
          type: string
          format: uuid
        wallet_id:
          type: string
          format: uuid
        deposit_amount:
          type: string
        currency:
          type: string
        budget_remaining:
          type: string
        budget_used:
          type: string
        status:
          type: string
          enum:
            - open
            - active
            - closed
            - exhausted
            - error
        voucher_key:
          type: string
          description: Ed25519 public key for voucher verification
        expires_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
      required:
        - id
        - service_url
        - agent_id
        - wallet_id
        - deposit_amount
        - currency
        - budget_remaining
        - budget_used
        - status
        - voucher_key
        - expires_at
        - created_at
    Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
        details: {}
        request_id:
          type: string
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key (pk_test_* or pk_live_*), JWT session, agent token (agent_*),
        Ed25519 session (sess_*), or portal token (portal_*).

````