Skip to content

Conversation

justinwlin
Copy link
Contributor

@justinwlin justinwlin commented Aug 21, 2025

Overview

Internal ticket AE-1090, resolution to add feature for client level / request level API key.

Follow up:
Will need to update these docs
https://docs.runpod.io/sdks/python/endpoints

GraphQL Calls

GraphQL calls I don't believe have a client / are stateless:
So the way those can work is such that we do:

gpus = runpod.get_gpu("NVIDIA A100 80GB PCIe", ...apikey....)

Endpoint:

These have an internal state, so we can instantiate the Endpoint with the api key:
Before:

runpod.api_key = os.getenv("RUNPOD_API_KEY")

endpoint = runpod.Endpoint("YOUR_ENDPOINT_ID")

Now supported:

endpoint = runpod.Endpoint("YOUR_ENDPOINT_ID", API KEY)

@justinwlin justinwlin requested a review from deanq August 21, 2025 18:37
@justinwlin
Copy link
Contributor Author

Make this a per client rather than per client / per request

@justinwlin justinwlin force-pushed the feat/api-key-management branch from 7e88ffe to 6dac333 Compare August 27, 2025 15:10
Client Level API Key + Tests
@justinwlin justinwlin force-pushed the feat/api-key-management branch from 6dac333 to 5f9e154 Compare August 27, 2025 15:27
@deanq deanq merged commit 21c5b74 into main Sep 2, 2025
8 checks passed
@deanq deanq deleted the feat/api-key-management branch September 2, 2025 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants