Track and monitor your Fireworks AI API requests with Keywords AI logging
import requests url = "https://api.keywordsai.co/api/request-logs/create/" payload = { "model": "accounts/fireworks/models/llama-v3p1-8b-instruct", "prompt_messages": [ { "role": "user", "content": "Summarize the benefits of renewable energy" } ], "completion_message": { "role": "assistant", "content": "Renewable energy offers numerous benefits including reduced carbon emissions..." }, "cost": 0.0003, "generation_time": 1.5, "customer_params": { "customer_identifier": "user_202" } } headers = { "Authorization": "Bearer YOUR_KEYWORDS_AI_API_KEY", "Content-Type": "application/json" } response = requests.post(url, headers=headers, json=payload)
Was this page helpful?