Track and monitor your OpenRouter API requests with Keywords AI logging
import requests url = "https://api.keywordsai.co/api/request-logs/create/" payload = { "model": "openai/gpt-4o", "prompt_messages": [ { "role": "user", "content": "Explain quantum computing" } ], "completion_message": { "role": "assistant", "content": "Quantum computing is a revolutionary computing paradigm that leverages quantum mechanics..." }, "cost": 0.002, "generation_time": 3.1, "customer_params": { "customer_identifier": "user_789" } } headers = { "Authorization": "Bearer YOUR_KEYWORDS_AI_API_KEY", "Content-Type": "application/json" } response = requests.post(url, headers=headers, json=payload)
Was this page helpful?