Quick Start
Send your first chat completion request to Pawan.Krd with an API key, a model ID, and a message. The examples below use the base URL https://api.pawan.krd/v1.
Before your first request
- Create an API key in your API Keys dashboard. See the authentication guide for the Bearer token header.
- Choose a chat model from the model catalog or the models endpoint.
- Replace
pk-your_keyandyour-model-idin the example, then run it in your terminal or server environment.
Send a chat completion request
Pick your language:
1curl https://api.pawan.krd/v1/chat/completions \
2 -H "Authorization: Bearer pk-your_key" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "model": "your-model-id",
6 "messages": [
7 { "role": "user", "content": "Hello!" }
8 ]
9 }'What's happening
- You send a POST request to
/v1/chat/completionswith your API key and a messages array. - The API returns a JSON response with the model's completion in
choices[0].message.content. - Token usage is tracked in the
usagefield of the response.
To add streaming, vision inputs, or tool calls, read the chat completions reference. If a request fails, check the error codes guide.