Multiple AI models
always same syntax

Build your AI applications with the flexibility to switch between OpenAI and Google models without changing your code. Middlebop provides a unified API, helping you stay flexible and future-proof in a fast moving AI landscape.


Easy to get started

With our Typescript SDK, you can get started in minutes. Just npm install and you're ready to go. The message format and response is always the same.

Hot swappable models.
Switch between OpenAI and Google models without changing your code.
Single Api key.
Use the same API key for all models. No need to manage multiple keys or service accounts.
If you prefer REST, we have OpenAPI documented endpoints that is just as easy to use.

import { MiddlebopChatMessage, sendChat } from "@middlebop/client";

const middlebopApiKey = "mb-yourSuperSecretApiKey";

const messages: MiddlebopChatMessage[] = [
    role: "user",
    content: {
      type: "text",
      text: "Hello, who are you?",

  model: "gpt-4", // any supported model!
}).then((response) => {


Build better apps

With hotswappable models you can make your apps more flexible, faster and price efficient.

Let's get started
Smarter apps
Use different models for different tasks. No need to compromise.
Price efficient
Only let your premium users use expensive models.
Compare AI models and see their response and performance in different scenarios.
Always up to date
In a fast changing AI landscape, you can always switch and try out the latest models.
User preference
Let your users choose which model they want to use. Give them the power.
No downtime
If one model is down or goes bananas, you can instantly switch to another one.
Fast response
Call multiple models in parallel and use the one that responds first.
Have fun
Play around with different models and see which one makes your laugh.


Only pay for what you use

You pay for the number of tokens you process. Create a free account and top up your account balance and start using Middlebop.

ModelInput token priceOutput token price
gpt-4-0125-preview$0.011 / 1k tokens$0.033 / 1k tokens
gpt-4-1106-preview$0.011 / 1k tokens$0.033 / 1k tokens
gpt-4-1106-vision-preview$0.011 / 1k tokens$0.033 / 1k tokens
gpt-4$0.033 / 1k tokens$0.066 / 1k tokens
gpt-3.5-turbo-0125$0.00055 / 1k tokens$0.00165 / 1k tokens
gpt-3.5-turbo$0.0033 / 1k tokens$0.0066 / 1k tokens
gemini-pro$0.0001375 / 1k characters$0.0004125 / 1k characters
claude-3-haiku-20240307$0.000275 / 1k tokens$0.001375 / 1k tokens
claude-3-sonnet-20240229$0.0033 / 1k tokens$0.0165 / 1k tokens
claude-3-opus-20240229$0.0165 / 1k tokens$0.0825 / 1k tokens

Ready to build?
Create your free account today.