2026-09-14 · 5 min read
How Developers Utilize Air Credits to Access AI Inference Models
Explore how developers can purchase Air Credits and seamlessly call the /api/v1 chat completions endpoint on Air Inference to access various AI models.
Introduction
In the rapidly evolving landscape of artificial intelligence, developers are constantly seeking efficient ways to access powerful AI models. Air Inference provides a unique two-sided marketplace that allows developers to leverage AI inference through a system of Air Credits. This blog post will walk you through how developers can purchase Air Credits, enable various models, and seamlessly call the /api/v1 chat completions endpoint to access a plethora of AI models.
Understanding Air Inference
Air Inference is designed to facilitate the interaction between developers looking for AI capabilities and providers offering OpenAI-compatible endpoints. By utilizing Air Credits, developers can access a wide range of AI models, including those powered by vLLM, llama.cpp wrappers, and other innovative solutions hosted on platforms like RunPod.
The beauty of Air Inference lies in its simplicity. Developers can focus on building their applications without worrying about the complexities of managing AI infrastructure. Instead, they can purchase Air Credits, which are used to call APIs and access various AI models.
What Are Air Credits?
Air Credits are a digital currency used within the Air Inference ecosystem. They allow developers to access and utilize AI inference models effectively. When developers top up their Air Credits, they can use them to call the /api/v1 endpoint, which is designed for chat completions and other AI tasks.
Air Credits function like tokens, making it easy for developers to manage their spending and usage. This system also allows for flexibility, as developers can choose to purchase as many Air Credits as they need, depending on their project requirements.
How to Purchase Air Credits
Purchasing Air Credits is a straightforward process. Here’s a step-by-step guide to help developers get started:
-
Create an Account: First, visit the Air Inference website and create an account. This will give you access to the marketplace and the ability to manage your Air Credits.
-
Navigate to the Air Credits Purchase Section: Once logged in, head to the Air Credits section of your dashboard. This area provides an overview of your current balance and options for purchasing additional credits.
-
Select a Purchase Amount: Choose the amount of Air Credits you wish to purchase. The marketplace typically offers several tiers of credits, allowing you to select a package that fits your budget and anticipated usage.
-
Complete the Transaction: After selecting the desired amount, follow the prompts to complete your purchase. Payments are processed securely, ensuring that your financial information is protected.
-
Check Your Balance: Once the transaction is complete, check your Air Credits balance in your dashboard to confirm that the credits have been added.
Enabling AI Models
With your Air Credits topped up, you can now enable various AI models available on the Air Inference platform. Providers list their endpoints that are compatible with OpenAI standards, allowing for easy integration into your applications. Here’s how to enable models:
-
Browse Available Models: Explore the marketplace to find the AI models you want to use. Each model will have a description, including its capabilities, limitations, and any specific requirements for integration.
-
Select a Model: Once you find a model that fits your project needs, select it to view more details. This may include information on how to call the API, expected input and output formats, and any additional parameters you can use.
-
Review Documentation: Thoroughly review the documentation provided for the model. This is crucial for understanding how to interact with the API effectively and ensure you’re using it to its fullest potential.
-
Enable the Model in Your Application: Depending on the model's requirements, you may need to make specific configurations in your application to accommodate the API calls. Ensure that your environment is set up correctly to handle requests and responses.
Calling the /api/v1 Chat Completions Endpoint
Once you’ve enabled your desired AI models, you can start calling the /api/v1 chat completions endpoint. This is where the power of Air Inference comes to life, allowing you to generate chat completions using the AI models you’ve selected.
Step-by-Step API Call Process
-
Set Up Your Environment: Before making API calls, ensure that you have the necessary libraries installed in your development environment. Most developers use tools like
curl, Postman, or programming libraries (e.g., Axios for JavaScript) to make HTTP requests. -
Prepare Your Request: Structure your request according to the API documentation. You'll typically need to include your Air Credits balance and specify the model you wish to use.
-
Make the API Call: Once you’ve prepared your request, you can make the API call. Below is a simple example of how a request might look using
curl:curl -X POST https://api.airinference.com/api/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "your_model_name", "messages": [{"role": "user", "content": "Hello, how can I access AI models?"}], "max_tokens": 150 }'This example demonstrates how to send a message to the AI model and request a response. Adjust the parameters as necessary based on your specific needs.
-
Process the Response: After making the call, you’ll receive a response from the API. This response will typically include the generated text or relevant data from the AI model. Be sure to handle this response in your application appropriately, whether that involves displaying the information to users or processing it further.
Best Practices for Using Air Inference
To maximize your experience with Air Inference, consider the following best practices:
-
Monitor Your Air Credits Usage: Keep an eye on your Air Credits balance to ensure that you don’t run out during critical development phases. Regularly check your usage to plan your purchases effectively.
-
Explore Multiple Models: Don’t limit yourself to just one model. Experiment with different models available on the platform to find the best fit for your application. Each model may offer unique strengths that can enhance your project.
-
Stay Updated with Documentation: API specifications and features may evolve over time. Regularly check the documentation for updates, new features, or changes to existing models to ensure your integration remains seamless.
-
Engage with the Community: Participate in Air Inference community forums or discussions. Engaging with other developers can provide insights, tips, and shared experiences that can enhance your use of the platform.
-
Optimize API Calls: Whenever possible, optimize your API calls by minimizing unnecessary requests. This not only saves your Air Credits but also improves the performance of your application by reducing latency.
Conclusion
Air Inference presents a remarkable opportunity for developers to access advanced AI inference models through a simple and effective marketplace. By purchasing Air Credits, enabling various models, and calling the /api/v1 chat completions endpoint, developers can integrate AI capabilities into their applications with ease.
As AI technology continues to advance, platforms like Air Inference will play a crucial role in bridging the gap between developers and powerful AI tools. Embrace the capabilities of Air Inference and start building innovative applications that leverage AI to solve real-world problems.