Skip to content

Feature Request: Support Custom API Base URL in Client SDK #463

Closed

Description

@joan-code6

Hey, I am using a custom proxy called Hack Club AI, which provides free AI API access to Hack Club members. I love using the OpenRouter SDK, but it sadly doesn't have a proxy/custom base URL customization option even though the underlying API supports it.

Activity

  1. mattapperson commented on Nov 11, 2026

    @mattapperson
    Contributor

    The current SDK supports a custom base URL through the server_url argument:

    from openrouter import OpenRouter
    
    client = OpenRouter(
        api_key="...",
        server_url="https://your-proxy.example.com/api/v1",
    )

    Closing this out. If server_url does not work with your proxy on the latest version, please reopen with a small reproduction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions