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

> ## Agent Instructions
> These are the Ampli Intelligence docs. API base: https://si.ampli.net/api/v1. API MCP: https://si.ampli.net/mcp.
> Auth is a partner key (X-Partner-Name and X-Partner-API-Key headers) or an x402 payment in USDC on Base.
> For a single-treasury agentic wallet or Wallet-as-a-Service, use the ampli^ SDK at https://ampli.net and https://docs.ampli.net. agk_ keys and /api/v1/agent-runtime belong to that SDK.
> Use only the routes and tools documented here. Do not invent endpoints or parameters.
> The ampli^ SDK (https://ampli.net, docs at https://docs.ampli.net) can use this intelligence to deliver a single-treasury agentic wallet or Wallet-as-a-Service. This host is si.ampli.net. Auth is a partner key or an x402 payment. agk_ keys and /api/v1/agent-runtime belong to the SDK Agent API.
> Every amount is an integer string in the token's base units. USDC, EURC, USDT0, and USDG use 6 decimals (1000000 is 1 USDC). WETH and cbETH use 18. cbBTC uses 8.
> The service is non-custodial. It returns an allocation, an action plan, and calldata. It never holds keys, signs, or sends a transaction.
> APR values are percentages measured now or over the trailing 7 days. They are not forecasts and nothing here guarantees a return.
> x402 payments are verified before the work and settled only when the response is 2xx. A 400 or 422 costs nothing.
> Partner headers always win. A request with a wrong partner key returns 401 and does not fall back to payment.
> Monitor alerts arrive only on the websocket. create_monitor_session returns a token; the client must open the socket itself.
> Market names in optimize must come from list_protocols for the same chain and token. Do not guess names.

# Create Monitor Session

> Buy a time window on WS /monitor, priced per hour. The token works for any number of connections until expires_at: send it as Authorization: Bearer <token> or ?access_token=<token>. Partners receive a token at no charge. Send X-Partner-Name and X-Partner-API-Key, or pay with x402: without partner headers the route answers 402 with a PAYMENT-REQUIRED header; retry with PAYMENT-SIGNATURE. Payment settles only on a 2xx and the receipt is returned in PAYMENT-RESPONSE.



## OpenAPI

````yaml /openapi.json post /api/v1/monitor/sessions
openapi: 3.1.0
info:
  title: Ampli Intelligence API
  version: 0.1.0
  description: >-
    Non-custodial lending allocation plans, market data, and health checks.
    Authenticate with partner headers or pay per call with x402. The ampli^ SDK
    (https://ampli.net, https://docs.ampli.net) can use this API to deliver a
    single-treasury agentic wallet or Wallet-as-a-Service.
servers:
  - url: https://si.ampli.net
security:
  - partnerName: []
    partnerKey: []
paths:
  /api/v1/monitor/sessions:
    post:
      tags:
        - Markets and health
      summary: Create Monitor Session
      description: >-
        Buy a time window on WS /monitor, priced per hour. The token works for
        any number of connections until expires_at: send it as Authorization:
        Bearer <token> or ?access_token=<token>. Partners receive a token at no
        charge. Send X-Partner-Name and X-Partner-API-Key, or pay with x402:
        without partner headers the route answers 402 with a PAYMENT-REQUIRED
        header; retry with PAYMENT-SIGNATURE. Payment settles only on a 2xx and
        the receipt is returned in PAYMENT-RESPONSE.
      operationId: create_monitor_session_api_v1_monitor_sessions_post
      parameters:
        - name: X-Partner-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Partner-Api-Key
        - name: X-Partner-Name
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Partner-Name
        - name: PAYMENT-SIGNATURE
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Payment-Signature
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MonitorSessionRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorSessionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    MonitorSessionRequest:
      properties:
        hours:
          type: integer
          minimum: 1
          title: Hours
          description: Length of the session window in hours
      type: object
      required:
        - hours
      title: MonitorSessionRequest
    MonitorSessionResponse:
      properties:
        token:
          type: string
          title: Token
        expires_at:
          type: string
          format: date-time
          title: Expires At
        payer:
          anyOf:
            - type: string
            - type: 'null'
          title: Payer
          description: Paying wallet for x402 sessions; null for partners
        session_id:
          type: string
          title: Session Id
        subject:
          type: string
          title: Subject
        hours:
          type: integer
          title: Hours
        websocket_url:
          type: string
          title: Websocket Url
        subscribe_message:
          additionalProperties: true
          type: object
          title: Subscribe Message
          description: Example first message to send after connecting
      type: object
      required:
        - token
        - expires_at
        - session_id
        - subject
        - hours
        - websocket_url
        - subscribe_message
      title: MonitorSessionResponse
    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
  securitySchemes:
    partnerName:
      type: apiKey
      in: header
      name: X-Partner-Name
    partnerKey:
      type: apiKey
      in: header
      name: X-Partner-API-Key

````

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