Skip to content

Commit 7dab2f2

Browse files
authored
Merge pull request #114 from Just-Moh-it/docs/beta-to-platform-url
Docs: upgraded `beta.openai.com` -> `platform.openai.com` to prevent unnecessary redirects
2 parents 0363de2 + 88a2f0b commit 7dab2f2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The OpenAI Node.js library provides convenient access to the OpenAI API from Node.js applications. Most of the code in this library is generated from our [OpenAPI specification](https://github.com/openai/openai-openapi).
44

5-
**Important note: this library is meant for server-side usage only, as using it in client-side browser code will expose your secret API key. [See here](https://beta.openai.com/docs/api-reference/authentication) for more details.**
5+
**Important note: this library is meant for server-side usage only, as using it in client-side browser code will expose your secret API key. [See here](https://platform.openai.com/docs/api-reference/authentication) for more details.**
66

77
## Installation
88

@@ -12,7 +12,7 @@ $ npm install openai
1212

1313
## Usage
1414

15-
The library needs to be configured with your account's secret key, which is available on the [website](https://beta.openai.com/account/api-keys). We recommend setting it as an environment variable. Here's an example of initializing the library with the API key loaded from an environment variable and creating a completion:
15+
The library needs to be configured with your account's secret key, which is available on the [website](https://platform.openai.com/account/api-keys). We recommend setting it as an environment variable. Here's an example of initializing the library with the API key loaded from an environment variable and creating a completion:
1616

1717
```javascript
1818
const { Configuration, OpenAIApi } = require("openai");
@@ -29,13 +29,12 @@ const completion = await openai.createCompletion({
2929
console.log(completion.data.choices[0].text);
3030
```
3131

32-
Check out the [full API documentation](https://beta.openai.com/docs/api-reference?lang=node.js) for examples of all the available functions.
32+
Check out the [full API documentation](https://platform.openai.com/docs/api-reference?lang=node.js) for examples of all the available functions.
3333

3434
### Request options
3535

3636
All of the available API request functions additionally contain an optional final parameter where you can pass custom [axios request options](https://axios-http.com/docs/req_config), for example:
3737

38-
3938
```javascript
4039
const completion = await openai.createCompletion(
4140
{

0 commit comments

Comments
 (0)