Quick Start

Get your first edge AI completion in under 60 seconds.

1

Create a free account

Sign up at native1api.com/register using your email or Google OAuth via Firebase.

2

Generate an API key

Navigate to your Developer Console → API Keys tab → click "Generate Key".

3

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.

Recommended

Developer API Keys

Long-lived tokens prefixed with n1_live_. Generated in the Developer Console. Never expire. Ideal for server-to-server production use.

Testing

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_KEY

API Keys

Manage developer API keys via the REST API or Developer Console.

GET /v1/keys

List 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"
  }
]
POST /v1/keys

Generate 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"
  }
}
DELETE /v1/keys/:keyId

Permanently 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.

POST /v1/chat/completions

Request Parameters

model string
The model ID (e.g. deepseek-v4-flash) *
messages array
Array of role/content message objects *
temperature float
Sampling temperature (0–2). Default: 0.7
max_tokens integer
Max output tokens. Default: 1024
stream boolean
Enable SSE streaming. Default: false

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.

ModelCategoryInput / 1MOutput / 1MSavings vs Market

DeepSeek V4 Flash

deepseek-v4-flash

Utility$0.181$0.363usage-based

GPT-5.4 Nano

gpt-5.4-nano

Balanced$0.259$1.624usage-based

GPT-5.4 Mini

gpt-5.4-mini

Balanced$0.974$5.849usage-based

Gemini 3.1 Pro

gemini-3.1-pro

Reasoning$2.599$15.599usage-based

Grok 4.5

grok-4.5

Reasoning$2.599$7.799usage-based

GPT-5.5 Standard

gpt-5.5-standard

Reasoning$6.499$38.999usage-based
GET /v1/models
— Returns the live model registry with current pricing.

Billing & 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.

GET /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 CodeErrorCause & Fix
400Bad RequestMalformed JSON body or missing required parameters.
401Access DeniedMissing or invalid Authorization header. Check your Bearer token.
402Payment RequiredFree Tier credit balance is $0.00. Top-up via the Billing tab.
404Not FoundThe requested route or resource does not exist.
405Method Not AllowedWrong HTTP method used for this endpoint.
500Internal ErrorServer-side failure. Contact support if persistent.
502Inference FailureUpstream 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 →