Keywords AI provides an Async Logging API that allows you to log your LLM requests and responses asynchronously, which offers complete observability of your LLM applications and won’t disrupt your application’s performance.
You have to add your own credentials to activate AI gateway otherwise your LLM calls will cause errors. We will use your credentials to call LLMs on your behalf.We won’t use your credentials for any other purposes and no extra charges will be applied.Go to the Providers page to add your credentials.
Learn how to add credentials to a specific provider here.
Keywords AI offers various integration options, including: mainstream LLM frameworks and REST APIs.
If you are using OpenAI SDK, it’s pretty straightforward to integrate AI gateway into your codebase.
set the base_url to https://api.keywordsai.co/api
set the api_key to your Keywords AI API key
Go to this page to learn details of OpenAI SDK Integration.
Copy
from openai import OpenAIclient = OpenAI( base_url="https://api.keywordsai.co/api/", api_key="YOUR_KEYWORDSAI_API_KEY",)response = client.chat.completions.create( model="gpt-4o-mini", messages=[{"role":"user", "content":"Tell me a long story"}],)