Getting Started
Getting Started
Section titled “Getting Started”This guide will help you get started with PureAPI service.
Prerequisites
Section titled “Prerequisites”- OpenAI compatible API client
- API Key (from console)
Get API Key
Section titled “Get API Key”- Visit PureAPI Console
- Register/Login
- Create API Key in “Tokens” page
Configure Client
Section titled “Configure Client”import { Tabs, TabItem } from ‘@astrojs/starlight/components’;
client = OpenAI( base_url="https://api.pureapi.net/v1", api_key="sk-your-api-key")
response = client.chat.completions.create( model="gpt-4", messages=[{"role": "user", "content": "Hello!"}])
print(response.choices[0].message.content)```