SDKs

Anthropic SDK + Velisity

The Messages API as at Anthropic: base_url without /v1, key in x-api-key.

4 steps

Setup

  1. Key

    Create a key in the console and put it in the VELISITY_API_KEY environment variable. The configs below read it from there.

    bash
    export VELISITY_API_KEY="vls_live_…"
    Get a key →
  2. Python

    The SDK appends /v1/messages itself.

    python
    import osimport anthropic client = anthropic.Anthropic(base_url="https://api.velisity.live", api_key=os.environ["VELISITY_API_KEY"])msg = client.messages.create(model="anthropic/claude-sonnet-4-5", max_tokens=1024, messages=[{"role": "user", "content": "ping"}])
  3. Other models via Messages

    You can call non-Claude models through /v1/messages too — the gateway translates the format. Translation limits are in the docs.

  4. Check that it works

    A request to /v1/key returns the key name, limits and balance — if you get JSON back, the key and URL are right.

    bash
    curl https://api.velisity.live/v1/key -H "Authorization: Bearer $VELISITY_API_KEY"

Your first request in a minute

Create a key, change the base_url — and your code already works with any model. You only pay for answers.