DEV Community

Cover image for APIMart: Discounted AI API Aggregator for GPT-5, Sora 2 💎
Anthony Max
Anthony Max Subscriber

Posted on

APIMart: Discounted AI API Aggregator for GPT-5, Sora 2 💎

TL;DR

Today, there are numerous AI models, and it's important for businesses to be able to work with them easily and, most importantly, profitably.

Every entrepreneur who runs their own service wants to pay as little as possible for AI tokens and have a personal account with all the keys to the LLM providers' APIs.

Today I would like to introduce you to a site called APIMart, which will help you and your business with this.

Well, let's get started! 🏎️


👀 What is APIMart?

I would say this: if you are looking for a place to buy cheap access to many popular API providers, then this service will help you with that.

intro

Use one OpenAI-compatible API to reach leading global models across text, image, video, and multimodal workloads. APIMart unifies keys, billing, monitoring, and production access so teams can ship AI features faster at a lower operating cost.


⚙️ How to use it?

First of all, when working with APIMart, it's important to understand that it's a user-friendly API. Let's try creating our first connection to an AI model.

To do this, you will need to register on the website:

register

It won't take more than 5 minutes. Next, let's go to your personal account. Let's say I want to create an image.

personal account

By clicking the "Create an API Key" button, I can create my first key that I can use. It's worth noting that you can only specify the API key group and name. Advanced settings are optional.

API Key

After creating an API key, you can select the model to use for image generation. I'll be using gpt-image-2 from OpenAI, but you can choose any model that suits your pricing and needs.

gpt-image-2

It's also worth noting that you can use the free tariff for the model to see if it's right for you.

📚 Documentation

After we've set up our API key, we can now use the model via the API. There's a tab on the model page for this. Clicking on it will take us to the documentation page.

documentation

There's a lot written here about how to use the model, but if anything is missing, the documentation is actively updated.

To access the API, let's try typing the following line in the terminal:

# model can be "gpt-image-2", or the compatible alias "gpt-image-2-ext"
curl --request POST \
  --url https://api.apimart.ai/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "gpt-image-2",
    "prompt": "Make an image for the article",
    "n": 1,
    "size": "16:9",
    "resolution": "2k"
  }'
Enter fullscreen mode Exit fullscreen mode

If everything is configured correctly, we'll get the generated image.

const url = "https://api.apimart.ai/v1/images/generations";

const payload = {
  model: "gpt-image-2",
  prompt: "Make an image for the article",
  n: 1,
  size: "16:9",
  resolution: "2k"
};

const headers = {
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
};

fetch(url, {
  method: "POST",
  headers: headers,
  body: JSON.stringify(payload)
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));
Enter fullscreen mode Exit fullscreen mode

It's worth noting that the API can be accessed from any programming language that supports HTTP requests. So, for example, here's what it would look like using JavaScript.


💬 Feedback

If you have questions about the site's operation or want to learn about new features, you can always find them in the community's official project channels:

social links

Or write directly in the form on the website, which is also convenient:

form


🖋️ Conclusion

APIMart is a great solution for entrepreneurs and companies looking to optimize their AI service costs and simplify their workflow across various models. Instead of managing multiple API keys from different providers, you get a single, convenient interface with your personal account.


🔗 Resources:

Thanks for reading this article! ❤️

I'd love to hear your thoughts on this mode in the comments!

Top comments (2)

Collapse
 
anthonymax profile image
Anthony Max

What do you think of the article? Which AI model do you use most?

Collapse
 
alexjohn_21 profile image
alexjohn_21

Mostly GPT-5.6