pai
    Preparing search index...

    The API address

    This guide covers PHANTOM_BASE_URL, the address pai sends every Phantom AI call to, and why pai accepts only https:// there.

    pai calls https://phantom.codes/v1 ( DEFAULT_BASE_URL). Set PHANTOM_BASE_URL to use another Phantom AI deployment:

    export PHANTOM_BASE_URL=https://phantom.example.org/v1
    

    The paths in the interface reference are relative to this address.

    pai sends your API key with each call, so it refuses any address that doesn't start with https:// ( httpsOnly). That includes http://localhost: there is no exception for your own machine.

    Problem Error code
    the value isn't a web address base_url_invalid
    the address isn't https:// base_url_insecure

    The check runs every time pai builds a Phantom AI address: each API call, fetching the receipt key for verify, and pai setup, which writes each coding agent's own address into its settings, such as https://phantom.codes/codex/v1 for Codex ( agentBaseUrl). See Setting up coding agents.

    It can serve its own receipt key, since verify fetches the key from the same address. A valid receipt proves the server at PHANTOM_BASE_URL signed it. See Receipts and verify.