AgnicPay provides a unified API that gives you access to 340+ AI models through a single endpoint. Get started with just a few lines of code using your preferred SDK or framework.
from openai import OpenAIclient = OpenAI( base_url="https://api.agnic.ai/v1", api_key="agnic_tok_YOUR_TOKEN",)completion = client.chat.completions.create( model="openai/gpt-4o", messages=[ { "role": "user", "content": "What is the meaning of life?" } ])print(completion.choices[0].message.content)
Start building without spending. These models are completely free:
Model
Provider
Context
meta-llama/llama-3.3-70b
Meta
128K
meta-llama/llama-3.1-8b
Meta
128K
mistralai/mixtral-8x7b
Mistral
32K
mistralai/mistral-7b
Mistral
32K
# Use free models for developmentcompletion = client.chat.completions.create( model="meta-llama/llama-3.3-70b", # Free! messages=[{"role": "user", "content": "Write a poem about coding"}])
stream = client.chat.completions.create( model="openai/gpt-4o", messages=[{"role": "user", "content": "Write a short story"}], stream=True)for chunk in stream: if chunk.choices[0].delta.content: print(chunk.choices[0].delta.content, end="")
# Using API Tokenclient = OpenAI( base_url="https://api.agnic.ai/v1", api_key="agnic_tok_YOUR_TOKEN",)# Using OAuth2 Tokenclient = OpenAI( base_url="https://api.agnic.ai/v1", api_key="agnic_at_YOUR_OAUTH_TOKEN",)