The Compatibility API allows developers to use SeekrFlow through OpenAI’s SDK.
It makes it easy to switch existing OpenAI-based applications to use Seekr’s models while still maintaining the use of OpenAI SDK — no big refactors needed.
Installation
First, install the OpenAI SDK and import the package.
Then, create a client and configure it with the Compatibility API base URL and your Seekr API key.
Basic chat completions
Here’s a basic example using the Chat Completions API:
Chat with streaming
To stream the response, set the stream parameter to True.
State management
For state management, use the messages parameter to build the conversation history.
You can include a system message via the developer role and the multiple chat turns between the user and assistant.
You can utilize the tool use feature by passing a list of tools to the tools parameter in the API call. This one creates a custom unit conversion tool that can be configured dynamically.
Next, register the function from JSON and run the unit conversion tool:
Supported parameters
The following is the list supported parameters in the Compatibility API, including those that are not explicitly demonstrated in the examples above:
- model
- messages
- stream
- temperature
- logprobs
- top_logprobs
- max_tokens
- stop
- top_p
- frequency_penalty
- presence_penalty
Unsupported parameters
The following parameters are not supported in the Compatibility API:
- tool_choice
- store
- reasoning_effort
- metadata
- logit_bias
- max_completion_tokens
- n
- modalities
- prediction
- audio
- service_tier
- stream_options
- parallel_tool_calls
- user
Last modified on June 18, 2026