#need help in api key
1 messages ยท Page 1 of 1 (latest)
Copy this and import it into Postman. Replace pk-***[OUR_API_KEY]*** with your own key. go to https://discord.com/channels/1055397662976905229/1064807234825113621 and use the /key command to get your own key.
curl --location 'https://api.pawan.krd/v1/chat/completions' \
--header 'Authorization: Bearer pk-***[OUR_API_KEY]***' \
--header 'Content-Type: application/json' \
--data '{
"model": "pai-001-light",
"max_tokens": 100,
"messages": [
{
"role": "system",
"content": "You are an helpful assistant."
},
{
"role": "user",
"content": "Who are you?"
}
]
}'
thanks i can make the request now can u help me with one more thing is there any package that i can use in dotnet environment (visual code package) for consuming for hosted api
you can use the official OpenAI dotnet package
but it won't work with your hosted model right?
you have to set the endpoint in the OpenAIClientOptions
example:
OpenAIClientOptions settings = new()
{
Endpoint = new Uri("https://api.pawan.krd")
};
ohh'kay thanks again bro
you're welcome
Hello sir, i was just wondering if I could add this to the common issues thread, since not many people who help here know exactly much about code, and there have been quite the few people asking how to use the api in postman/open ai library
Of course, you can. When our website is released, we will have a documentation page for developers.
Thank you sir, and I do have a question.
This code will work for postman and open ai library, yes?
its only a CURL command for requesting the API programmatically, which can be imported into Postman