Skip to main content

Overview

The Qontext API provides programmatic access to your context repository. Use it to build custom applications, workflows, agents, and internal tools that retrieve, search, create, and update context. All API requests are authenticated using API keys.

Creating an API key

Please refer to the API reference for all available endpoints and examples.
1

Go to Clients

In the Qontext app, go to the Clients tab. To add an API key, click on + Create API key in the top right corner.Qontext Add API Key
2

Create API key

In the Create an API key window, give your key a name, add an expiration date if required, and enter client instructions. For more information on instructions, see System instructions.Qontext API Key Creation 1
3

Cope API key

Copy the API key and store it somewhere safe. You will not be able to view it again later.
4

Access Qontext

You can now access the context repository from any application, workflow, or script by passing the key as the X-API-Key header in API requests.

Authentication

Pass the API key as the X-API-Key header:
--header 'X-API-Key: q_sk_***************'

Available operations

The API can be used to:
  • Read files and folders
  • Search the context repository
  • Create files and folders
  • Update files and folders
  • Manage clients
  • Manage sources
  • Retrieve logs
Please refer to the API Reference for endpoint documentation and examples.

Best practices

One API key per use case or environment.Use separate keys per workflow, agent, or environment. That enables easy revocation, makes the origin of retrieval logs clearly identifiable, and lets you use API-key-level system instructions where needed.

FAQ

In the Qontext app, open the Clients tab. Click the three dots next to the key and choose Revoke. Once revoked, the key is automatically disabled and removed from the list. Create a new key for the same use case and update the client using it.Qontext Revoke API Key