Reverse proxy to use OpenAI API Join Our Discord Server 😁
- Works same as OpenAI API
- Supports Streaming!
- It's FREE!
You can support our work by donating
We realy appreciate your Support
Patreon: https://patreon.com/pawanosman
PayPal: [email protected]
A free private API key (required to reduce abuse use) To get a free API key for this reverse proxy you can follow the below steps.
- First join our Discord server and go to #Bot channel
- Do
/key
command and it will give you a Free API key for this reverse proxy endpoint.
Note:
- First time you join may be you need to wat for 10 mins to be able to send message.
- Each API key is tied to a single IP address, so if you use an API key with a particular IP address, you cannot use it from any other IP address.
- You can reset your Key IP address by using
/resetip
command from our Discord Server.
To use this API, you need to send a POST request to the following endpoint:
https://gpt.pawan.krd/api/completions
The body object parameters are the same body object of the official API . Example:
Key | Value | Description |
---|---|---|
prompt | your prompt | |
temperature | 0.7 | Controls the "creativity" of the generated text. Higher values result in more creative responses. |
max_tokens | 256 | Maximum number of tokens (words) in the generated response. |
top_p | 0.9 | Controls the "diversity" of the generated text. Higher values result in more diverse responses. |
frequency_penalty | 0 | Penalizes the model for repeating words/phrases in the generated response. |
presence_penalty | 0 | Penalizes the model for omitting words/phrases from the input prompt in the generated response. |
model | text-davinci-003 | Specifies the GPT model to use for generating the response. |
stop | <|im_end|> | Specifies the sequence of characters to use as the end of the generated response. |
stream | true/false | If set to true, the response will be streamed. |
curl -X POST \
https://gpt.pawan.krd/api/completions \
-H 'Authorization: Bearer <YOUR_KEY_FROM_DISCORD>' \
-H 'Content-Type: application/json' \
-d '{
"prompt": "Hello?",
"temperature": 0.7,
"max_tokens": 256,
"top_p": 0.9,
"frequency_penalty": 0,
"presence_penalty": 0,
"model": "text-davinci-003",
"stop": "<|im_end|>"
}'
import axios from 'axios';
const data = JSON.stringify({
"prompt": "Hello?",
"temperature": 0.7,
"max_tokens": 256,
"top_p": 0.9,
"frequency_penalty": 0,
"presence_penalty": 0,
"model": "text-davinci-003",
"stop": "<|im_end|>"
});
const config = {
method: 'post',
url: 'https://gpt.pawan.krd/api/completions',
headers: {
'Authorization': 'Bearer <YOUR_KEY_FROM_DISCORD>',
'Content-Type': 'application/json'
},
data : data
};
let response = await axios(config);
console.log(response.data);
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("https://gpt.pawan.krd/api/completions"),
Headers =
{
{ "Authorization", "Bearer <YOUR_KEY_FROM_DISCORD>" },
{ "Content-Type", "application/json" },
},
Content = new StringContent(@"{
""prompt"": ""Hello?"",
""temperature"": 0.7,
""max_tokens"": 256,
""top_p"": 0.9,
""frequency_penalty"": 0,
""presence_penalty"": 0,
""model"": ""text-davinci-003"",
""stop"": ""<|im_end|>""
}"),
};
HttpResponseMessage response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
string responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
}
import requests
import json
url = "https://gpt.pawan.krd/api/completions"
payload = {
"prompt": "Hello?",
"temperature": 0.7,
"max_tokens": 256,
"top_p": 0.9,
"frequency_penalty": 0,
"presence_penalty": 0,
"model": "text-davinci-003",
"stop": "<|im_end|>"
}
headers = {
'Authorization': 'Bearer <YOUR_KEY_FROM_DISCORD>',
'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers, data=json.dumps(payload))
print(response.text)
https://gpt.pawan.krd/api/completions