Skip to main content
Keymate API documentation

Everything you need to know about our API in one place

Ozgur Ozkan avatar
Written by Ozgur Ozkan
Updated over a week ago

Keymate API Documentation

There are two types of Keymate APIs.

A) Keymate SyncMate Cloud & SSO API - this API allows you to get all the features Keymate offers in it's ChatGPT plugin, KeymateGPT, and custom GPTs provided to any no-code builders from ChatGPT plus community. In other words, it provides users with the core Keymate functions in an API format.

Here is a breakdown of the features included:

Cloud API:


1. Google Search, Web Scraping and LLM context window optimization API.

2. Unified personalized long term memory that allows signed in users access to the same memory hub between different custom GPTs and Keymate GPT

You can read relational data from users personalized long term memory or insert to personalized long term memory.

3. You can sign in users currently by demanding their Keymate API key. It's anytime revokable so it's safe to share.

4. Hybrid search and all in one search that is being developed ( Scans 10 google pages and whole unified personalized long term memory and provides full page contents at the same time and optimizes responses based on context window

SSO API:

1. By utilizing sharable Keymate API keys (that can be found at https://ln.keymate.ai/plans) you can ensure that users use their own API keys by passing their personal keys as a parameter. With this idea in mind, we provided the "apikeyconsumer" field that dictates which user's credit quota will be reduced when responding to a prompt. We have also created the "apikeyuser" field which denotes which user is accessing the API. Our personalized Long Term Memory responses will be based on the "apikeyuser" field. Both the above fields can have the same or different values depending on the design of your app or service.

NOTE: We will provide extra endpoints to allow you to access who the user is (name, surname and email) soon. Enter your email at https://keymate.ai/gpts to stay informed.


Both APIs can be accessed via Python SDK and as Custom Actions in Custom GPTS. The OpenAPI spec is here .


On Python SDK you can demand your users to login to Keymate at https://ln.keymate.ai/plans and you prompt them to share their API key with you so that you can sign them in and access their long term memory.

As Keymate Custom Action on Custom GPTs you should use your own API key. Currently OpenAI doesn't support users to share their API key with GPTs.
If you want to build something and want your users to sign in to Keymate in a way that Keymate GPT does, please contact us on intercom (available at bottom left of the page).

As you may realize Keymate GPT or other custom GPTs built with Keymate SSO API shares the same unified personalized long term memory. It's "personalized" because only signed in users can access their individual long term memory. It's "unified" because now multiple GPTs can utilize the same memory hub.


B) Keymate.AI Google Browse Assistant API (ALPHA) LLM enabled (GPT4 8K controlled + Claude 2 100K processes huge Google Search and scraping data)

This is exactly same with GPT4 8K API with function calling on the first call but behind the scenes it uses Claude 2 API + Huge Google Search Page Scraping + LLM Optimization.


These API endpoints are currently in Alpha stage and they respond quite slow, usually between 45 seconds - 2 minutes. These endpoints are particularly useful for job batching operations or long running jobs. They are not designed for instant responses yet.

On the Beta stage, we are going to provide APIs that respond in under 30 seconds. You can learn more about them soon.

To get your API key, head over to https://ln.keymate.ai/plans. Scroll down and you will see your API key.

Your API can be shared with Keymate.AI Powered applications that use the Keymate API. You have control of your API key you can press the "Regenerate" button to revoke the existing key and generate a new one.

When you share your API key, your usages on Keymate powered apps may consume credits from your account. Each time the Keymate API is called by a third party application, you may see your credits consumed.


To start developing apps with Keymate's APIs please read on:


We have launched the APIs, the details are below:

This is a development endpoint but it charges credits just like a production endpoint does. You can reach out to us to get the production endpoint if you are going to release it to other users/customers. We also provide affiliate program where you can sell Keymate accounts to end users to monetize your application or software developed with Keymate API.

We haven't released it fully yet, but you can use it here. Grab the API key from https://ln.keymate.ai/plans

POST request to (GET IS NOT ALLOWED)
https://flask-hello-world-dev.vercel.app/keymategpt (It Auto uses Google+Browsing if it's needed GPT-4 decides the Google usage, i.e. if you say just 'hello' it won't use Google)
https://flask-hello-world-dev.vercel.app/keymategptforce ( It forces Google+Browsing, if you say hello it will search "hello" on Google Claude 2 will process it and feed data to GPT4)

Sample Input:

{
"prompt": "When is the next coldplay concert?",
"apikeyuser": "REPLACE_WITH_API_KEY",
"apikeyconsumer": "REPLACE_WITH_API_KEY"
}


All fields are necessary


​Sample Output:

{
"object": "text_completion",
"model": "keymateapi-claude2-gpt4-8k",
"choices": [
{
"text": "The next Coldplay concert is on November 6, 2023, at the Tokyo Dome in Tokyo, Japan. Please note that the concert is already sold out.",
"finish_reason": "stop"
}
]
}

This endpoint is currently using GPT-4 8K to control responses. If GPT-4 decides to run Google search it uses 10 content pages, feeding it to Claude 2's 100K context window. Claude 2 prepares the data for GPT-4 8K and has GPT-4 8K answer the users prompt.

It costs 1 credit per 1000 input tokens, we don't have control over which pages have more content but depending on search query on Google, it may consume between 2 - 100 credits.

API Timeout is 90 seconds.

Happy to get your feedback about it through email or the blue chat feature in the bottom right corner.

Head over to https://ln.keymate.ai/plans and login and then refresh the page if it doesn't appear below like this:



FAQ

Can I see my API consumption?

Not directly, however, you can track your overall usage on top left where it shows your current allowance at https://ln.keymate.ai/plans .


How my users will use my Keymate API powered application?

You can ask for the API key from Keymate users and redirect them to https://ln.keymate.ai/plans

Our endpoints have two different fields one is apikeyuser and the other one is apikeyconsumer. Request credits are spent from the apikeyconsumer field. The apikeyuser field is used to determine which individual user is using Keymate API.
You can use the same API key for both fields or you can use these fields separately.


This is designed in a way that allows you to build applications on top of user's existing personal knowledge bases. Currently Keymate.AI has 500,000 personal knowledge base records that include user's trained PDF files and ChatGPT interactions. You can build things like Personal Knowledge Base visualization tools or showing their personal knowledge base to the users.

Please note:

1: This only works for users that agree to use their login api key with you.

2: There will be Keymate Login SDK where you will be able to redirect users to keymate login and then they give access to your app if they want.

We launched every single Keymate API endpoint that is built for Keymate users.
CRUD operations on personal knowledge base: i.e. Adding an item to personal knowledge base or resetting personal knowledge base, searching on personal knowledge base. ( 2-10 seconds)
​Standalone Google links + summaries (2 seconds)
Standalone Google + Scraping multiple pages with detailed parameters ( 30 seconds )

Hybrid search ( Google + Personal Knowledge Base)

Metadatakb ( gives how many records exist in personal knowledge base)
/document (Claude 2) /pdfpro (GPT4 32K) File Reading ( Keymate handles file uploads at https://ln.keymate.ai/web )

Our first launched endpoint uses: GPT4 8K controlled Google Search + Scraping (Browsing) + Claude 2 + GPT4 8K processing

How can I charge users or build products that utilize my user's personal knowledge base?


Option A: You charge users directly yourself and buy a high quota package from us. (Web App, Desktop App, Apple App store, Google Play Store friendly)

(Users Knowledge base features will not be possible this way unless you implement yourself)

(You may need to monitor your quota usage to keep your app working and upgrade request from us to get a higher quota package.)
(This is a prepaid option)

Option B: You direct users to sign up to Keymate and they can share their Keymate API key with you to use with your product. You can still charge users directly but you can also redirect them to buy Keymate plans where we do affiliate promotions and revenue share with you.
(Web app, Desktop app friendly)
(Apple App Store wouldn't allow you to launch an app that requests an API key field)

(Knowledge base features are available because we login users automatically when you send us their api key via apikeyuser field. You can utilize user's Keymate knowledge base records to build apps and websites)

Option C: After launching to production, (if implementing Option A) we can charge your company based on your API usage monthly. (Only for Keymate approved apps)

Did this answer your question?