cURL
Quick copy-paste cURL recipes for every endpoint. Use -N for streaming so curl flushes output immediately.
Chat completion
💻Chat
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": "pkrd/cosmosrp-3.5",
6 "messages": [{ "role": "user", "content": "Hello!" }]
7 }'Streaming chat
💻Streaming
1curl -N https://api.pawan.krd/v1/chat/completions \
2 -H "Authorization: Bearer pk-your_key" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "model": "pkrd/cosmosrp-3.5",
6 "messages": [{ "role": "user", "content": "Tell a story" }],
7 "stream": true
8 }'Embeddings
💻Embeddings
1curl https://api.pawan.krd/v1/embeddings \
2 -H "Authorization: Bearer pk-your_key" \
3 -H "Content-Type: application/json" \
4 -d '{ "model": "your-embedding-model", "input": "hello" }'Text-to-speech
💻TTS
1curl https://api.pawan.krd/v1/audio/speech \
2 -H "Authorization: Bearer pk-your_key" \
3 -H "Content-Type: application/json" \
4 -o speech.mp3 \
5 -d '{ "model": "your-tts-model", "input": "Hello world", "voice": "alloy" }'Speech-to-text
💻STT (multipart)
1curl https://api.pawan.krd/v1/audio/transcriptions \
2 -H "Authorization: Bearer pk-your_key" \
3 -F model="your-stt-model" \
4 -F file=@audio.mp3Image generation
💻Images
1curl https://api.pawan.krd/v1/images/generations \
2 -H "Authorization: Bearer pk-your_key" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "model": "your-image-model",
6 "prompt": "A cat astronaut",
7 "size": "1024x1024"
8 }'