pai
    Preparing search index...

    Function payFetch

    • A custom fetch for OpenAI and Anthropic SDKs, paid from Tempo Wallet over MPP. No API key is needed: placeholder Authorization and x-api-key headers are removed. The SDK must request streaming responses; Phantom's keyless inference routes currently accept streams only.

      Wallet setup is lazy: the first request connects the wallet, offers funding and asks for a capped access key. Later calls reuse it and the payment channel. Only the configured HTTPS origin may be called, and redirects are refused, so payment credentials cannot follow a redirect to another host.

      Parameters

      Returns Promise<
          {
              (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
              (input: string | URL | Request, init?: RequestInit): Promise<Response>;
          },
      >