Getting Provider
- Using the API:
- In Python:
curl -X GET -H "x-javelin-apikey: $JAVELIN_API_KEY" "https://your-api-domain.com/v1/admin/providers/openai"
Javelin Get Provider Example
from javelin_sdk import (
JavelinClient,
JavelinConfig
)
import os
# Retrieve environment variables
javelin_api_key = os.getenv('JAVELIN_API_KEY')
# Create Javelin configuration
config = JavelinConfig(
base_url="https://your-api-domain.com",
javelin_api_key=javelin_api_key
)
# Create Javelin client
client = JavelinClient(config)
# provider name to get is "openai"
provider_name = "openai"
# get the provider, for async use `await client.aget_provider(provider_name)`
fetched_provider = client.get_provider(provider_name)
print(fetched_provider.model_dump_json(indent=2))