seamsdocs

curl

Point the base URL, mint a key per end user, call with that key.

  1. 1. Point the base URL at us

    Inference goes to the gateway. Control-plane calls (minting keys) go to the api. Live that is https://gw.ourseams.com and https://api.ourseams.com. Locally: http://localhost:8788 and http://localhost:8787.

    GATEWAY_BASE_URL=https://gw.ourseams.com/v1
  2. 2. Mint one key per end user at signup

    Attribution comes from the key, never from a header. Store the returned ak_ on their user row. a shared key with an end-user header would be forgeable from the tenant's own code, and would make the spend cap advisory rather than enforced.

    Mint

    curl https://api.ourseams.com/v1/keys \
      -H "Authorization: Bearer sk_test_…" \
      -H "Content-Type: application/json" \
      -d '{"endUserId":"user_123","bundle":"default"}'

    POST /v1/keys answers 501 not_implemented until #70 lands. The shape above is the contract — run it when that issue closes.

  3. 3. Call with that key, model "acme/smart"

    Use the key from step 2. Until a live provider key exists, local test credit only pays for mock/fast.

    Call

    curl https://gw.ourseams.com/v1/chat/completions \
      -H "Authorization: Bearer ak_…" \
      -H "Content-Type: application/json" \
      -d '{"model":"acme/smart","messages":[{"role":"user","content":"hello"}]}'

    POST /v1/chat/completions answers 501 not_implemented until #60 lands. The shape above is the contract — run it when that issue closes.