August 3, 2026
Six ways to give a free AI model to your Coding Agent
Must have resources and API keys to get for a 0$ bill.

By Fabio Matricardi
19 min read
You know me. I will never stop to look for free AI resources.
In fact, local AI are required when dealing with sensitive and private documents. But for everything else, a free powerful AI is the best choice.
And as I mentioned in my previous article, the best way to use an AI coding Agent (with a free tier AI) is to build your own apps, keeping in mind one simple rule: your AI powered app must be able to work with a small AI model, that you can run locally.
So today I will list out the 6 must have free resources that you can use with your coding Agent (I am used to OpenCode): and I will share as well python snippet so that you can test them or use them in your demo.
The listed below resources do not require any kind of top up, just a normal registration process.
⚠️ Note: I will talk about all these 6 resources not in order of importance, but I will start from the most unknown!
Table of Contents
1. Zenmux
2. Groq
3. Puter.js
4. Gemini
5. NVIDIA NIM
6. Mistral1. Zenmux
2. Groq
3. Puter.js
4. Gemini
5. NVIDIA NIM
6. Mistral
1. Zenmux free API
base_url="https://zenmux.ai/api/v1"
api_key="<ZENMUX_API_KEY>"
model="stepfun/step-3.7-flash-free"base_url="https://zenmux.ai/api/v1"
api_key="<ZENMUX_API_KEY>"
model="stepfun/step-3.7-flash-free"ZenMux is an AI service platform designed to simplify and unify access to various artificial intelligence models.
According to their website, the name "ZenMux" combines two concepts:
- Zen: Their goal is to handle the complexity of AI systems so that users can enjoy a simple, streamlined experience (one account, one API, one platform).
- Mux (Multiplexer): They aggregate authorized channels from major AI providers — such as OpenAI, Anthropic, Google, and DeepSeek — and intelligently route tasks to the best available model.
Key aspects of ZenMux include:
- Reliability & Assurance: They emphasize a "compensation-powered" model, meaning if a service or model underperforms, there is a built-in compensation mechanism.
- Developer-Focused: The platform is built specifically for developers, offering unified SDKs, observability, traceability, and transparent pricing to help manage AI integrations from development to production.
- Quality Control: They focus on routing to the best models without relying on "degraded copies," ensuring that the quality of the AI output is verifiable and traceable.
- Vision: They aim to act as a "trusted access and underwriting layer" for AI applications, where their "Assured by ZenMux" status serves as a signal of safety and reliability for AI builders.
To make it short… ZenMux is a tool meant to make it easier for developers to integrate, monitor, and optimize their use of multiple AI models through a single, reliable service. And it comes with several free models available through API calls.
It is quite easy to register. From the main webpage click on the top right on Sign In. You have 3 options (I choose GitHub)
There are several plans: you have to go for the free (default) and create an API Key from the Pay As You Go menu ro directly from the Model card. See pictures here below.
Go to your profile — PAYG API — create a new API key
Remember to save it somewhere SAFE!
Or you can browse the models and create it from there.
You can browse the models typing free inside the search box, to get all the available free Endpoints.
Then click on the API Requests and go up to the details and code snippets.
Here a simple python snippet to use the free models in your apps or pipelines…
#pip install openai
from openai import OpenAI
client = OpenAI(
base_url="https://zenmux.ai/api/v1",
api_key="<ZENMUX_API_KEY>",
)
# Chat Completion
completion = client.chat.completions.create(
model="stepfun/step-3.7-flash-free",
messages=[
{
"role": "user",
"content": "What is the meaning of life?"
}
]
)
print(completion.choices[0].message.content)
# Responses API
responses = client.responses.create(
model="stepfun/step-3.7-flash-free",
input="What is the meaning of life?"
)
print(responses)#pip install openai
from openai import OpenAI
client = OpenAI(
base_url="https://zenmux.ai/api/v1",
api_key="<ZENMUX_API_KEY>",
)
# Chat Completion
completion = client.chat.completions.create(
model="stepfun/step-3.7-flash-free",
messages=[
{
"role": "user",
"content": "What is the meaning of life?"
}
]
)
print(completion.choices[0].message.content)
# Responses API
responses = client.responses.create(
model="stepfun/step-3.7-flash-free",
input="What is the meaning of life?"
)
print(responses)How to setup Opencode
You can connect Opencode to ZENMUX with the API key you just created few sections above:
- start opencode
- Ctrl+p to open the options
- go to Connect provider
- look for ZenMux
- paste there your API key
- pick one of the free models and set the variant (default if you don't know)
And it is done.
Now Opencode will run with GLM 5.2 (free) under the hood
You can read more about how to use the API Endpoints in the official quickstart guide.
2. GROQ API free
base_url="https://api.groq.com/openai/v1"
api_key="GROQ_API_KEY"
model="qwen/qwen3.6-27b"base_url="https://api.groq.com/openai/v1"
api_key="GROQ_API_KEY"
model="qwen/qwen3.6-27b"Groq is a specialized AI infrastructure company focused entirely on ultra-fast, low-cost inference (the process of running a pre-trained AI model to generate responses).
Unlike traditional cloud providers that host AI models on GPUs (like Nvidia's H100s), Groq developed its own custom silicon architecture known as the Language Processing Unit (LPU).
Key Technical Features of the LPU Architecture:
- Deterministic Execution: Instead of relying on complex, dynamic scheduling at runtime (which causes unpredictable latency spikes on GPUs), the LPU utilizes a software-first approach. Groq's compiler pre-schedules every single computation down to individual clock cycles before execution even begins.
- On-Chip SRAM: Instead of fetching weights from slower external High-Bandwidth Memory (HBM), the LPU stores model weights directly in high-speed, on-die SRAM. This removes memory bottlenecks entirely and increases access speeds by roughly 20x.
- Blazing Throughput: Because of this architecture, Groq delivers open-source large language models at unprecedented speeds. For example, it can run smaller models like Llama 3.1 8B at upwards of 560–840 tokens per second (TPS), and larger models like Llama 3.3 70B at 280–394 TPS.
- Drop-In Compatibility: Groq's API is fully OpenAI-compatible. You can switch your existing apps to use Groq by changing just two lines of code — the
base_url(pointing to[https://api.groq.com/openai/v1](https://api.groq.com/openai/v1)) and your API key.
Note: Groq does not build its own foundational models; they host open-weights models developed by others, such as Meta's Llama series, Qwen, Mistral, and OpenAI's open-weights models.
About the GroqCloud Free API Tier
Groq offers a highly capable Free Tier through GroqCloud designed to allow developers to build, test, and prototype apps without entering a credit card. The key constraint of this tier is rate limits, rather than restricted model access — meaning you get access to all available models on the platform.
Free Tier Limits & Capabilities:
As you can see there are quite a lot of amazing LLM in the free tier, with 14k requests per day with up to 500k tokens per day.
You have several option to register: like the ones here below
Once you are registered, create an API key and start your adventure.
Few of the models available for free here…
llama-3.1-8b-instant
llama-3.3-70b-versatile
meta-llama/llama-4-scout-17b-16e-instruct
openai/gpt-oss-120b
qwen/qwen3-32b
qwen/qwen3.6-27bllama-3.1-8b-instant
llama-3.3-70b-versatile
meta-llama/llama-4-scout-17b-16e-instruct
openai/gpt-oss-120b
qwen/qwen3-32b
qwen/qwen3.6-27bAnd here how to use it with python:
from openai import OpenAI
client = OpenAI(
api_key="GROQ_API_KEY",
base_url="https://api.groq.com/openai/v1",
)
response = client.responses.create(
input="Explain the importance of fast language models",
model="openai/gpt-oss-20b",
)
print(response.output_text)from openai import OpenAI
client = OpenAI(
api_key="GROQ_API_KEY",
base_url="https://api.groq.com/openai/v1",
)
response = client.responses.create(
input="Explain the importance of fast language models",
model="openai/gpt-oss-20b",
)
print(response.output_text)You can also use the dedicated groq SDK
#using the groq sdk - pip intall groq
from groq import Groq
client = Groq(api_key="GROQ_API_KEY")
completion = client.chat.completions.create(
model="llama-3.3–70b-versatile",
messages=[
{
"role": "user",
"content": ""
}
],
temperature=1,
max_completion_tokens=1024,
top_p=1,
stream=True,
stop=None
)
for chunk in completion:
print(chunk.choices[0].delta.content or "", end="")#using the groq sdk - pip intall groq
from groq import Groq
client = Groq(api_key="GROQ_API_KEY")
completion = client.chat.completions.create(
model="llama-3.3–70b-versatile",
messages=[
{
"role": "user",
"content": ""
}
],
temperature=1,
max_completion_tokens=1024,
top_p=1,
stream=True,
stop=None
)
for chunk in completion:
print(chunk.choices[0].delta.content or "", end="")How to setup Opencode
You can connect Opencode to Groq with the API key you just created few sections above:
- start opencode
- Ctrl+p to open the options
- go to Connect provider
- look for Groq
- paste there your API key
- Select a free model and set the variant as default
Now you can use opencode con Groq.
3. Puter.js
puter_token = "your_superLONG_puterJS_token" #API Key
model = "openai/gpt-5.4-nano" #Model
BASE_URL = "https://api.puter.com/puterai/openai/v1"puter_token = "your_superLONG_puterJS_token" #API Key
model = "openai/gpt-5.4-nano" #Model
BASE_URL = "https://api.puter.com/puterai/openai/v1"Puter is not suited for Coding Agent: it is a full JavaScript ready framework. I will show you shortly, anyway, how to use it in your python app, or the AI powered ones you will cook yourself with Opencode!
Puter.js is a serverless, keyless JavaScript library that lets you build full-stack web applications entirely in your frontend code (browser-side JavaScript). It eliminates the need to build a backend, provision servers, or manage cloud services.
By dropping a single <script> tag into your HTML or running npm install @heyputer/puter.js, your app instantly gets access to a complete backend toolkit:
- AI Gateway: Interact with hundreds of premium LLMs (like Claude, GPT, Gemini, and DeepSeek) with a single line of code.
- Cloud Storage & Databases: Read/write files and use a fast NoSQL Key-Value store directly from the browser.
- Built-in Auth: Simple user login systems without setting up OAuth or auth servers.
- Hosting & Networking: Instantly host static sites or make requests without worrying about CORS restrictions.
How the Free API Tier Works (The "User-Pays" Model)
Puter.js approaches the "free tier" differently than almost any other cloud platform. Instead of giving the developer a small bucket of monthly credits that will eventually run out or break when traffic spikes, Puter uses a User-Pays model.
Here is how it keeps everything 100% free for you:
- No API Keys Required: You don't sign up for an API key, meaning there is nothing to leak, steal, or hardcode into your frontend code.
- The User Holds the Tab: When a visitor uses a feature in your app that requires cloud infrastructure or AI tokens (like chatting with a model or saving a file), Puter automatically handles it by prompting the user to sign in with their own Puter account (via a clean popup).
- Zero Cost to Scale: Because each user authenticates and covers their own computing/AI footprint using their individual Puter accounts, you as the developer pay exactly $0.
- Infinite Scalability: Whether your app has 1 user or 1 million users, it costs you nothing to run. You never have to worry about a massive surprise bill if your project goes viral.
How to register?
You have all the option above. After you are in you will be presented with the Puter apps and home.
From the same main menu you can browe on the left panel to Home and account details
An in the Account section you can see both your assigned username and an option to create an API Token (that we need to test our python code)
Puter.js is not suited for Agent harness, but for everything else it is a powerhouse. You have more than 400 models, basically for free.
You can use it for your chat apps, using the following parameters:
puter_token = "your_superLONG_puterJS_token" #API Key
selected_model = "openai/gpt-5.4-nano" #Model
BASE_URL = "https://api.puter.com/puterai/openai/v1"puter_token = "your_superLONG_puterJS_token" #API Key
selected_model = "openai/gpt-5.4-nano" #Model
BASE_URL = "https://api.puter.com/puterai/openai/v1"💡 Tip: you can ask Opencode to write for you an Openai compatible API gateway, listening on localhost:11434, that routes all your AI Agents requests to Puter.js
I prefer to keep the TOKEN outside the python code: so I saved it into a file called config.json in the same directory of the CLI app
{
"token": "your_superLONG_puterJS_token",
"model": "openai/gpt-5.4-nano"
}{
"token": "your_superLONG_puterJS_token",
"model": "openai/gpt-5.4-nano"
}For example, I used Opencode to write for me a multi turn, multi line chat CLI app like the one here below: it will read the config.json file and initiate the conversation powered by puter.js models.
import json
import sys
import os
from openai import OpenAI, APIError
# Import Rich and Prompt Toolkit utilities
from rich.console import Console
from rich.markdown import Markdown
from rich.panel import Panel
from rich.text import Text
from prompt_toolkit import prompt
# Initialize the global rich console object
console = Console()
def load_config(config_path="config.json"):
"""Loads configuration data from config.json."""
if not os.path.exists(config_path):
console.print(f"[bold red]Error:[/bold red] Configuration file '{config_path}' not found.")
sys.exit(1)
try:
with open(config_path, "r") as f:
config = json.load(f)
if not config.get("token"):
console.print("[bold red]Error:[/bold red] Puter 'token' missing from config.json")
sys.exit(1)
return config
except json.JSONDecodeError:
console.print("[bold red]Error:[/bold red] Failed to parse config.json.")
sys.exit(1)
def main():
config = load_config()
puter_token = config["token"]
selected_model = config.get("model", "gpt-4o")
console.print("[bold cyan]Connecting to Puter's new OpenAI-compatible API layer...[/bold cyan]")
client = OpenAI(
base_url="https://api.puter.com/puterai/openai/v1",
api_key=puter_token
)
messages = [
{"role": "system", "content": "You are a helpful AI assistant running via Puter platform."}
]
# Display welcome message inside a styled panel with hotkey instructions
welcome_text = Text()
welcome_text.append(f"Active Model: ", style="bold magenta")
welcome_text.append(f"{selected_model}\n\n", style="italic green")
welcome_text.append("Editing Rules:\n", style="bold underline yellow")
welcome_text.append("• Press ", style="dim")
welcome_text.append("Enter", style="bold white")
welcome_text.append(" to create a new line.\n", style="dim")
welcome_text.append("• Press ", style="dim")
welcome_text.append("Alt + Enter", style="bold reverse white")
welcome_text.append(" (or Esc then Enter) to send your message.\n\n", style="dim")
welcome_text.append("Commands: ", style="bold blue")
welcome_text.append("type 'exit' or 'quit' to close. Type 'clear' to reset history.", style="yellow")
console.print(Panel(welcome_text, title="[bold reverse cyan] Multi-Line Conversation Started [/bold reverse cyan]", border_style="cyan"))
while True:
try:
# Print a clean prompt indicator using Rich first
console.print("\n[bold reverse green] You [/bold reverse green] (Alt+Enter to send):")
# Use prompt_toolkit to safely accept multi-line entries
user_input = prompt(" ❯ ", multiline=True).strip()
if not user_input:
continue
if user_input.lower() in ['exit', 'quit']:
console.print("[bold red]Ending session. Goodbye![/bold red]")
break
if user_input.lower() == 'clear':
messages = [{"role": "system", "content": "You are a helpful AI assistant running via Puter platform."}]
console.print("\n[bold yellow]✨ Chat context wiped clean for a fresh start. ✨[/bold yellow]\n")
continue
messages.append({"role": "user", "content": user_input})
with console.status("[bold yellow]Thinking...[/bold yellow]", spinner="dots"):
response = client.chat.completions.create(
model=selected_model,
messages=messages
)
ai_response = response.choices[0].message.content
console.print(f"\n[bold reverse blue] AI ({selected_model}) [/bold reverse blue]")
console.print(Markdown(ai_response))
console.print("[dim]─" * console.width + "[/dim]")
messages.append({"role": "assistant", "content": ai_response})
except APIError as e:
console.print(f"\n[bold red]Puter Platform API Error:[/bold red] {e}\n")
except KeyboardInterrupt:
# Catching Ctrl+C inside prompt_toolkit drops to a clean next line or exits gracefully
console.print("\n[bold red]Session interrupted. Exiting...[/bold red]")
break
except Exception as e:
console.print(f"\n[bold red]An unexpected framework error occurred:[/bold red] {e}\n")
if __name__ == "__main__":
main()import json
import sys
import os
from openai import OpenAI, APIError
# Import Rich and Prompt Toolkit utilities
from rich.console import Console
from rich.markdown import Markdown
from rich.panel import Panel
from rich.text import Text
from prompt_toolkit import prompt
# Initialize the global rich console object
console = Console()
def load_config(config_path="config.json"):
"""Loads configuration data from config.json."""
if not os.path.exists(config_path):
console.print(f"[bold red]Error:[/bold red] Configuration file '{config_path}' not found.")
sys.exit(1)
try:
with open(config_path, "r") as f:
config = json.load(f)
if not config.get("token"):
console.print("[bold red]Error:[/bold red] Puter 'token' missing from config.json")
sys.exit(1)
return config
except json.JSONDecodeError:
console.print("[bold red]Error:[/bold red] Failed to parse config.json.")
sys.exit(1)
def main():
config = load_config()
puter_token = config["token"]
selected_model = config.get("model", "gpt-4o")
console.print("[bold cyan]Connecting to Puter's new OpenAI-compatible API layer...[/bold cyan]")
client = OpenAI(
base_url="https://api.puter.com/puterai/openai/v1",
api_key=puter_token
)
messages = [
{"role": "system", "content": "You are a helpful AI assistant running via Puter platform."}
]
# Display welcome message inside a styled panel with hotkey instructions
welcome_text = Text()
welcome_text.append(f"Active Model: ", style="bold magenta")
welcome_text.append(f"{selected_model}\n\n", style="italic green")
welcome_text.append("Editing Rules:\n", style="bold underline yellow")
welcome_text.append("• Press ", style="dim")
welcome_text.append("Enter", style="bold white")
welcome_text.append(" to create a new line.\n", style="dim")
welcome_text.append("• Press ", style="dim")
welcome_text.append("Alt + Enter", style="bold reverse white")
welcome_text.append(" (or Esc then Enter) to send your message.\n\n", style="dim")
welcome_text.append("Commands: ", style="bold blue")
welcome_text.append("type 'exit' or 'quit' to close. Type 'clear' to reset history.", style="yellow")
console.print(Panel(welcome_text, title="[bold reverse cyan] Multi-Line Conversation Started [/bold reverse cyan]", border_style="cyan"))
while True:
try:
# Print a clean prompt indicator using Rich first
console.print("\n[bold reverse green] You [/bold reverse green] (Alt+Enter to send):")
# Use prompt_toolkit to safely accept multi-line entries
user_input = prompt(" ❯ ", multiline=True).strip()
if not user_input:
continue
if user_input.lower() in ['exit', 'quit']:
console.print("[bold red]Ending session. Goodbye![/bold red]")
break
if user_input.lower() == 'clear':
messages = [{"role": "system", "content": "You are a helpful AI assistant running via Puter platform."}]
console.print("\n[bold yellow]✨ Chat context wiped clean for a fresh start. ✨[/bold yellow]\n")
continue
messages.append({"role": "user", "content": user_input})
with console.status("[bold yellow]Thinking...[/bold yellow]", spinner="dots"):
response = client.chat.completions.create(
model=selected_model,
messages=messages
)
ai_response = response.choices[0].message.content
console.print(f"\n[bold reverse blue] AI ({selected_model}) [/bold reverse blue]")
console.print(Markdown(ai_response))
console.print("[dim]─" * console.width + "[/dim]")
messages.append({"role": "assistant", "content": ai_response})
except APIError as e:
console.print(f"\n[bold red]Puter Platform API Error:[/bold red] {e}\n")
except KeyboardInterrupt:
# Catching Ctrl+C inside prompt_toolkit drops to a clean next line or exits gracefully
console.print("\n[bold red]Session interrupted. Exiting...[/bold red]")
break
except Exception as e:
console.print(f"\n[bold red]An unexpected framework error occurred:[/bold red] {e}\n")
if __name__ == "__main__":
main()Now let's move to the most common, and yet generous free API tiers.
4. Gemini API free
base_url="https://generativelanguage.googleapis.com/v1beta/openai/"
api_key="GEMINI_API_KEY"
model="gemma-4-31b-it"base_url="https://generativelanguage.googleapis.com/v1beta/openai/"
api_key="GEMINI_API_KEY"
model="gemma-4-31b-it"Probably the most used email account service is still gmail: and maybe you are not aware, but with your basic email account you are entitled to access many Gemini or Gemma models without any kind of subscription fee or credit card.
You simply need to go to https://aistudio.google.com/ and login with your email account credential.
If you want first to check the pricing, click on the top bar Pricing option and you will be redirected to https://ai.google.dev/gemini-api/docs/pricing.
Once you are in the pricing page you can already see which models have a free tier included. For instance, Gemini 3.5 Flash does also have free tiers API calls.
Once logged in, create an API Key and a Project: this is the way the API calls are tracked and the limits are computed
The cool thing is that you can verify in the free tier how many Requests per Day (RPD) you have for every model. Look here below…
Imagine what you can do with:
- 1500 requests per day on Gemma 4 26B MoE
- 1500 requests per day on Gemma 4 31B
- 500 requests per day on Gemini 3.1 Flash Lite
Now it is only a matter to understand how to use all these resources on our computer.
You can read more about Gemini for Developers here below:
Google's underrated Goldmine: the zero-dollar Blueprint for powerful AI A complete, step-by-step guide to connecting Google's top models to your everyday apps and workflows at zero cost.
How to use them in Opencode
You can read more about Opencode in my Series here on Medium.
Opencode is an agent harness, that lets you plan and execute Generative AI model to run your tasks even without having a professional programming background or knowledge.
You can connect Opencode to Google AI with the API key you just created few sections above:
- start opencode
- Ctrl+p to open the options
- go to Connect provider
- look for Goolge
- paste there your API key
Now you will see all available models in the Google/Gemini API endpoints, and you can select the ones you want.
I suggest you to go for
gemma-4-26b-a4b-it
gemma-4-31b-it
gemini-3.1-flash-litegemma-4-26b-a4b-it
gemma-4-31b-it
gemini-3.1-flash-litebecause they have generous limits… and AI agents run a lot of calls!
5. NVIDIA Nim free
base_url="https://integrate.api.nvidia.com/v1"
api_key="NVIDIA_API_KEY"
model="nvidia/nemotron-3-ultra-550b-a55b"base_url="https://integrate.api.nvidia.com/v1"
api_key="NVIDIA_API_KEY"
model="nvidia/nemotron-3-ultra-550b-a55b"NVIDIA is the leader Company in the AI and GPU compute era. And they offer not only free training, but also free API calls to some of the best LLM available.
Specifically, NVIDIA NIM (NVIDIA Inference Microservices) is a set of easy-to-use microservices designed to accelerate the deployment of generative AI models across any NVIDIA-accelerated infrastructure. When you visit build.nvidia.com, as a developers you can access a massive catalog of enterprise-grade AI models (including Llama 3, Mistral, and NVIDIA's own Nemotron) running on high-performance NVIDIA GPUs.
The Free Tier: how it works
NVIDIA offers a "try-before-you-buy" model designed for prototyping and research. Here is how the free access is structured:
- Initial Credits: Upon signing up for the NVIDIA Developer Program, you are typically granted 1,000 free API credits. These credits allow you to make requests to the hosted NIM endpoints without needing your own GPU hardware.
- Requesting More: If you exhaust your initial 1,000 credits, you can often request additional credits (bringing the total up to 5,000) by providing a business email. This upgrade also typically includes a 90-day NVIDIA AI Enterprise license, which allows for deeper evaluation of the platform.
- Transition to Rate Limits: Recent reports from mid-2025 indicate that NVIDIA has been shifting some users from a strict credit-based system to a rate-limited model for ongoing development. This allows for continuous prototyping (roughly 40 requests per minute) as long as the usage is strictly for non-production, developmental purposes.
Key features of the Free catalog
- OpenAI-Compatible API: All models in the catalog follow the standard OpenAI API format. You can integrate them into existing applications by simply changing the
base_urlto NVIDIA's endpoint and providing your API key. - Model Diversity: You aren't limited to just text LLMs. The catalog includes specialized models for:
- Reasoning and Chat: Llama 3.3, Mistral, and Nemotron.
- Vision and Multimodal: Models capable of processing images and video.
- Coding: Specialized models like DeepSeek-Coder and Qwen-Coder.
- BioNeMo: Specialized models for drug discovery and protein folding.
3. Portability: A unique feature of NIM is that once you've prototyped using the free cloud API, you can download the same NIM container to run on your own local NVIDIA hardware (RTX PCs or workstations) or private cloud.
Of course… there are some usage restrictions
While the API is free to use for development, NVIDIA distinguishes between "Development" and "Production":
- Free/Developer Tier: Ideal for students, researchers, and hobbyists building proof-of-concepts. You get access for the duration of your Developer Program membership.
- NVIDIA AI Enterprise: Required once you move to production. This provides enterprise-grade security, dedicated support, and higher stability for commercial applications.
Get your API calls
Register from https://build.nvidia.com/ or from https://developer.nvidia.com/nim. Confirm the email, and verify your mobile number (you will get a code). And you are ready to go!
In your profile add an API key (and save it somewhere on your PC!!!)
The Docs are well curated and clear. But in case you cannot understand them, paste the link in any AI powered search engine and ask for clarification. I did the same, in few cases.
How to setup Opencode
You can connect Opencode to NVIDIA NIM with the API key you just created few sections above:
- start opencode
- Ctrl+p to open the options
- go to Connect provider
- look for Nvidia
- paste there your API key
Browse through the free Endpoint model to get the name of the model you want before proceeding: for example
Select in Opencode the Model and the variant (Default if you don't know)
And you are done. Ready to work in your AI Harness with NVIDIA NIM model provider
You can read more about NVIDIA Nim features here below:
Are you too a Poor-GPU-guy? Here's how to run 400B parameter Models for free A complete guide to NVIDIA NIM's free tier: get hundreds of API calls, access frontier models like Llama 3.3 and…
6. Mistral API free
base_url="https://api.mistral.ai/v1"
api_key="MISTRAL_API_KEY"
model="ministral-14b-2512"base_url="https://api.mistral.ai/v1"
api_key="MISTRAL_API_KEY"
model="ministral-14b-2512"I remember to talk about Mistral free tier already in February 2025. And now it is time to consider again their generous tier.
In fact, exploring cutting-edge AI can quickly become an expensive hobby once you start calling commercial cloud APIs for your personal automation scripts. Fortunately, European AI powerhouse Mistral AI provides an incredibly generous free tier for developers and hobbyists.
Mistral offers completely free access to their top-tier frontier models via an API that is fully compatible with OpenAI's standard formatting. This means if you write a simple Python automation script, you can target Mistral's infrastructure seamlessly without ever entering a credit card.
- The Explorer's Advantage: Mistral explicitly prioritizes data privacy, making it easy to opt out of model training so your data stays your own. It gives you a rock-solid, production-grade cloud sandbox to test your autonomous agents or custom interfaces for zero financial investment.
- Best Use Case: Powering your background automation scripts, home dashboards, or testing out code workflows before committing to hosting massive models locally.
You can read more about Mistral AI here below:
Beyond ChatGPT: 4 Hidden-Gem Open Source AI Projects You Can Use Today Move past basic chat boxes and take control with vectorless RAG, local knowledge graphs, and zero-cost developer…
How to start in 5 minutes
Go to https://chat.mistral.ai/ and Sign up: you have as options to register with Google, Apple or Microsoft account.
Once you are in, you get the same experience of the Anthropic web app, with workspace, vibe coding and chat app.
If you want to use the Mistral models in your Opencode, MiMo Code or your personal created apps, go to http://console.mistral.ai/ and login with the newly created credentials.
Click on your profile on the top right and go to API Keys to create a new one.
IF you go to https://console.mistral.ai/home you can get all the OPEN model and explore the list
But the easiest way to verify what models you have free access to is to click directly from the Console to the left panel on the Limits progress bar.
Note that the models here are already showing the same model name to be used when calling the mistral API endpoint. For example, here below the model card of Ministral 14b 2512, both from the pricing/limits page and the Model Card.
Let's have a look with a simple python example:
from openai import OpenAI
# Initialize the client with Mistral's base URL and your API key
client = OpenAI(
base_url="https://api.mistral.ai/v1",
api_key="YOURMISTRALAPIKEY" # Grabs the key fro Mistral Console
)
# Make the chat completion call
response = client.chat.completions.create(
model="ministral-14b-2512",
messages=[
{
"role": "user",
"content": "How far is the moon from earth?"
}
]
)
# Print the response content
print(response.choices[0].message.content)from openai import OpenAI
# Initialize the client with Mistral's base URL and your API key
client = OpenAI(
base_url="https://api.mistral.ai/v1",
api_key="YOURMISTRALAPIKEY" # Grabs the key fro Mistral Console
)
# Make the chat completion call
response = client.chat.completions.create(
model="ministral-14b-2512",
messages=[
{
"role": "user",
"content": "How far is the moon from earth?"
}
]
)
# Print the response content
print(response.choices[0].message.content)And that is it! Change the model name accordingly: here I used ministral-14b-2512 as shown in the model card.
How to setup Opencode
You can connect Opencode to Mistral AI with the API key you just created few sections above:
- start opencode
- Ctrl+p to open the options
- go to Connect provider
- look for Mistral
- paste there your API key
- select a Model (pick one that is shown on the Limits page )
All done.
Conclusions
There is no better way to be free to code with and AI Agent than having free tier options. It is the best way to never run out of tokens.
In fact remember that coding agents are token greedy.
I never saw to have a working app at first turn, and not with at least 50k tokens in context spent.
And now I gave you several option. It it time to put all of them to work!
I hope you enjoyed the article. If this story provided value and you wish to show a little support, you could:
- Clap a lot of times for this story
- Highlight the parts more relevant to be remembered (it will be easier for you to find them later and for me to write better articles)
- Write with me on this Publication: there is no better way to learn than writing about it!
- Follow my publication https://medium.com/artificial-intel-ligence-playground
If you want to read more, here are some ideas:
Google's underrated Goldmine: the zero-dollar Blueprint for powerful AI A complete, step-by-step guide to connecting Google's top models to your everyday apps and workflows at zero cost.
Are you too a Poor-GPU-guy? Here's how to run 400B parameter Models for free A complete guide to NVIDIA NIM's free tier: get hundreds of API calls, access frontier models like Llama 3.3 and…
Beyond ChatGPT: 4 Hidden-Gem Open Source AI Projects You Can Use Today Move past basic chat boxes and take control with vectorless RAG, local knowledge graphs, and zero-cost developer…
The AI Agent Harness is the new battleground: and here's how to pick the right one Why the model you choose matters less than the layer that runs the loop between reasoning and execution.