url -X POST "
https://api.portkey.ai/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-portkey-provider: openai" \
-H "x-portkey-virtual-key: YOUR_OPENAI_API_KEY" \
-H "x-portkey-trace-id: assistant" \
-d '{
"config": {
"model": "gpt-4o",
"mode": "completion",
"temperature": 0.7
},
"messages": [
{
"role": "user",
"content": "System: prompt"
}
],
"trace": {
"user_id": "assistant",
"metadata": {
"app_version": "1.0",
"feature": "chat"
}
}
}'