Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,16 +286,26 @@ server) and bypass some authentication checks for project, location, or API key.
You may pass the custom base url like this:

```python
base_url = 'https://test-api-gateway-proxy.com'
client = Client(
vertexai=True, # Currently only vertexai=True is supported
http_options={
'base_url': base_url,
'headers': {'Authorization': 'Bearer test_token'},
},
vertexai=True,
http_options=types.HttpOptionsDict(
base_url='https://test-api-gateway-proxy.com',
base_url_resource_scope=types.ResourceScope.COLLECTION,
),
)

response = client.models.generate_content(
model='gemini-3-pro-preview', contents='Why is the sky blue?'
)
```

If `base_url_resource_scope=types.ResourceScope.COLLECTION`, the resource name
will not include api version, project, or location.

Expected request url will be:
https://test-api-gateway-proxy.com/publishers/google/models/gemini-3-pro-preview


## Types

Parameter types can be specified as either dictionaries(`TypedDict`) or
Expand Down