Quick Start
Get your first edge AI completion in under 60 seconds.
Create a free account
Sign up at native1api.com/register using your email or Google OAuth via Firebase.
Generate an API key
Navigate to your Developer Console → API Keys tab → click "Generate Key".
Make your first request
curl https://api.native1api.com/v1/chat/completions \
-H "Authorization: Bearer n1_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-flash",
"messages": [
{"role": "user", "content": "Hello from Native1API!"}
]
}'Authentication
Native1API supports account login and developer API keys.
Developer API Keys
Long-lived tokens prefixed with n1_live_. Generated in the Developer Console. Never expire. Ideal for server-to-server production use.
Firebase JWT Tokens
Short-lived (1hr) tokens issued by Firebase Auth. Available in your Dashboard. Ideal for browser-side testing and playground use.
Pass your key as a Bearer token in the Authorization header on all requests:
Authorization: Bearer n1_live_YOUR_API_KEYAPI Keys
Manage developer API keys via the REST API or Developer Console.
/v1/keysList all active API keys for the authenticated user.
curl https://api.native1api.com/v1/keys \
-H "Authorization: Bearer n1_live_YOUR_KEY"
// Response:
[
{
"id": "key_abc123",
"name": "Production Backend",
"truncated": "n1_live_...f3a2",
"createdAt": 1720550400000,
"lastUsedAt": 1720636800000,
"status": "active"
}
]/v1/keysGenerate a new API key. The raw key is returned once only — store it securely immediately.
curl -X POST https://api.native1api.com/v1/keys \
-H "Authorization: Bearer n1_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "My Production Server"}'
// Response:
{
"success": true,
"key": "n1_live_4a8b3c...", // ← SAVE THIS. Never shown again.
"metadata": {
"id": "key_xyz789",
"name": "My Production Server",
"truncated": "n1_live_...9f1c",
"createdAt": 1720550400000,
"status": "active"
}
}/v1/keys/:keyIdPermanently revoke an API key. This action is immediate and irreversible.
curl -X DELETE https://api.native1api.com/v1/keys/key_abc123 \
-H "Authorization: Bearer n1_live_YOUR_KEY"
// Response:
{"success": true, "message": "API key revoked successfully"}Chat Completions
OpenAI-compatible completions endpoint. Drop-in replacement for existing clients.
/v1/chat/completionsRequest Parameters
model string messages array temperature float max_tokens integer stream boolean Example Request
curl -X POST \
https://api.native1api.com/v1/chat/completions \
-H "Authorization: Bearer n1_live_..." \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-flash",
"messages": [
{
"role": "system",
"content": "You are a senior software engineer."
},
{
"role": "user",
"content": "Explain CORS in 2 sentences."
}
],
"temperature": 0.3,
"max_tokens": 256
}'Response Format
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 1720550400,
"model": "deepseek-v4-flash",
"choices": [{
"index": 0,
"message": {
"role": "assistant",
"content": "CORS (Cross-Origin Resource Sharing) is a browser security ..."
},
"finish_reason": "stop"
}],
"usage": {
"prompt_tokens": 28,
"completion_tokens": 42,
"total_tokens": 70
}
} Compatibility: Native1API follows the OpenAI chat completions request and response shape for standard client integrations.
Models & Pricing
All prices are per 1 million tokens. Native1API consistently undercuts competitors by $0.001/1M.
| Model | Category | Input / 1M | Output / 1M | Savings vs Market |
|---|---|---|---|---|
DeepSeek V4 Flash deepseek-v4-flash | Utility | $0.181 | $0.363 | usage-based |
GPT-5.4 Nano gpt-5.4-nano | Balanced | $0.259 | $1.624 | usage-based |
GPT-5.4 Mini gpt-5.4-mini | Balanced | $0.974 | $5.849 | usage-based |
Gemini 3.1 Pro gemini-3.1-pro | Reasoning | $2.599 | $15.599 | usage-based |
Grok 4.5 grok-4.5 | Reasoning | $2.599 | $7.799 | usage-based |
GPT-5.5 Standard gpt-5.5-standard | Reasoning | $6.499 | $38.999 | usage-based |
/v1/modelsBilling & Credits
Prepaid credit model. No subscriptions required. Credits never expire.
Free Tier
$0
$1.00 trial credit included. Access all models until balance runs out.
$20 Credit Block
$20
~110M DeepSeek V4 Flash input tokens. Priority routing included.
$100 Credit Block
$100
~552M tokens. Auto-recharge support. Best per-token value.
/v1/user/billing// Response:
{
"tier": "Free Tier",
"credits": 0.8420,
"tokensUsed": 4382,
"stripeCustomerId": null,
"updatedAt": 1720636800000
} Auto-Recharge: When your balance drops below $2.00, Native1API can automatically charge your saved Stripe payment method. Enable this in the Billing tab of your Developer Console.
Error Codes
All errors return a JSON body with error and message fields.
| HTTP Code | Error | Cause & Fix |
|---|---|---|
400 | Bad Request | Malformed JSON body or missing required parameters. |
401 | Access Denied | Missing or invalid Authorization header. Check your Bearer token. |
402 | Payment Required | Free Tier credit balance is $0.00. Top-up via the Billing tab. |
404 | Not Found | The requested route or resource does not exist. |
405 | Method Not Allowed | Wrong HTTP method used for this endpoint. |
500 | Internal Error | Server-side failure. Contact support if persistent. |
502 | Inference Failure | Upstream model routing error. Retry with exponential backoff. |
SDK Examples
Native1API is fully OpenAI SDK-compatible. Point any OpenAI client at our base URL.
Node.js / TypeScript
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.NATIVE1API_KEY,
baseURL: "https://api.native1api.com/v1"
});
const response = await client.chat.completions.create({
model: "deepseek-v4-flash",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(response.choices[0].message.content);Python
from openai import OpenAI
import os
client = OpenAI(
api_key=os.environ.get("NATIVE1API_KEY"),
base_url="https://api.native1api.com/v1"
)
response = client.chat.completions.create(
model="gpt-5.4-nano",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)cURL
curl -X POST https://api.native1api.com/v1/chat/completions \
-H "Authorization: Bearer n1_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.1-pro",
"messages": [{"role": "user", "content": "Explain edge computing."}],
"temperature": 0.5
}'Need help?
Try the live API Sandbox to test completions directly in your browser.
Open Playground Sandbox →