API Usage


We support three types of API for working with AI agents and models:

  • OpenAI-compatible API: suitable for integration with external libraries and UIs, using the standard request structure.

  • Native API: simpler and easier to use, especially when a quick result is needed without external dependencies.

  • AI Gateway: for working directly with models without using AI agents.

Key Differences
Copy link

Feature

OpenAI compatible API

Native API

AI Gateway

Object of operation

An agent

An agent

A model

Request format

messages[]

message + parentMessageId

messages[], responses

Message history

Sent with the request

Stored

Sent with the request

RAG / MCP

Supported

Supported

Not supported

Model settings

Via the agent's dashboard

Via request parameters

Sent with each request

Model selection

Limited to the agent's model

Limited to the agent's model

Any available model

Streaming responses

Supported

Not supported

Supported

Which API to Choose
Copy link

Use the OpenAI-compatible API if you:

  • Want to integrate the agent with external libraries (e.g., LangChain, Open WebUI)
  • Already use OpenAI and want to simply replace the URL
  • Need usage statistics (tokens, model)
  • Require streaming responses
  • Plan to use multimodal messages

Use the Native API if you:

  • Need built-in message history without explicitly passing context
  • Are building a simple app with minimal external dependencies
  • Want responses in a simple format
  • Need fast and lightweight integration, for example, for an MVP

Use AI Gateway if you:

  • Need to work directly with models without agent logic
  • Are building your own logic (e.g., RAG or request routing)
  • Need access to multiple models through a single API
  • Are using the OpenAI SDK and want to switch between models without changing your code