---
title: "Quick Start"
description: "Get started with AINative in 5 minutes. For humans or AI agents — get your API key, make your first call, and self-serve with zero-human provisioning."
canonical: "https://docs.ainative.studio/docs/getting-started/quick-start"
last-updated: "2026-09-23T01:51:08.820Z"
---

# Quick Start

Source: https://docs.ainative.studio/docs/getting-started/quick-start

> Get started with AINative in 5 minutes. For humans or AI agents — get your API key, make your first call, and self-serve with zero-human provisioning.

**Version**: 1.3
**Last Updated**: 2026-06-21
**Estimated Time**: 30 seconds (instant) or 15 minutes (full setup)

---

## Welcome to AINative Studio!

This guide will help you get up and running with the AINative Studio API. Choose your path:

- **30 seconds** — Get a temporary database instantly, no signup required
- **15 minutes** — Create a permanent account with full access

:::tip In a hurry?
The **[Integration Checklist](./integration-checklist)** condenses API key, authentication, and MCP setup into one linear page with a working end-to-end example — read it first if you just want the fastest path to a working integration.
:::

---

## Try Instantly (No Signup)

Get a working API key in 30 seconds — no email, no password, no credit card.

```bash
## Get a temporary database instantly — no signup required
curl -X POST https://api.ainative.studio/api/v1/public/instant-db
```

Response:
```json
{
  "api_key": "tmp_xxx...",
  "project_id": "uuid",
  "base_url": "https://api.ainative.studio",
  "expires_at": "72 hours from now"
}
```

:::tip Already have an account?
If you include an `Authorization` header, you'll receive a permanent `sk_` key instead of a `tmp_` key, and the project is assigned to your Default Workspace automatically.
:::

Now use your API key to make an AI request:

```bash
curl -X POST https://api.ainative.studio/api/v1/chat/completions \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "digitalocean",
    "model": "Llama-3.3-70B-Instruct",
    "messages": [
      {"role": "user", "content": "Hello, world!"}
    ]
  }'
```

Or set up your MCP server with one command:

```bash
npx zerodb-cli init
```

Your temporary database is valid for **72 hours**. When you're ready to keep your data, create a free account below to upgrade to a permanent project.

---

## For AI Agents (Zero-Human Provisioning)

If you are an AI agent, coding assistant, or autonomous system, you can self-serve an API key and start using AINative with **zero human intervention**. No CAPTCHA, no email verification, no manual approval.

> **Discovery:** Fetch `https://api.ainative.studio/.well-known/agent.json` for machine-readable capabilities, or read the full guide at `https://ainative.studio/agent.md`.

### The 4-Step Self-Service Flow

#### 1. Get a temporary API key (no auth required)

```bash
curl -X POST https://api.ainative.studio/api/v1/public/instant-db \
  -H "Content-Type: application/json" \
  -d '{"agree_terms": true}'
```

This returns an API key (with `tmp_` prefix for unauthenticated callers, or `sk_` prefix if you include an `Authorization` header), along with a `project_id`, `claim_url`, and `claim_token`.

> **Important:** You must send `agree_terms: true`. Without it, the API returns HTTP 451 with the terms URL.

#### 2. Verify your key status

```bash
curl -X POST https://api.ainative.studio/api/v1/api-keys/verify \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Check the `status` field: `READY` means full access, `trial_active` means the key works but expires in 72 hours. If the status is not `READY`, surface the `actions` URLs to the user.

#### 3. Register a permanent account (no CAPTCHA)

```bash
curl -X POST https://api.ainative.studio/api/v1/auth/register \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com",
    "password": "SecurePass123!",
    "full_name": "Agent User"
  }'
```

This returns an `access_token` (JWT). Rate limited to prevent abuse but requires no CAPTCHA or human verification.

#### 4. Claim your temp project (upgrade to permanent key)

```bash
curl -X POST https://api.ainative.studio/api/v1/instant-db/claim \
  -H "Authorization: Bearer ACCESS_TOKEN_FROM_STEP_3" \
  -H "Content-Type: application/json" \
  -d '{
    "token": "CLAIM_TOKEN_FROM_STEP_1",
    "project_id": "PROJECT_ID_FROM_STEP_1"
  }'
```

This deactivates the old `tmp_...` key and returns a permanent `zdb_live_...` key. Your data is preserved.

:::tip Already have data under a temp key?
Use `POST /api/v1/auth/merge-identity` with your `tmp_` key to transfer all projects and data into your real account without the claim flow.
:::

### API Key Prefixes

| Prefix | Type | Duration |
|--------|------|----------|
| `tmp_` | Temporary (unauthenticated instant-db) | 72 hours |
| `sk_` | Permanent (authenticated instant-db or account creation) | No expiry |
| `zdb_live_` | Permanent (from claiming a temp project) | No expiry |

### Agent Discovery

AI agents can discover AINative capabilities programmatically:

- **`/.well-known/agent.json`** — Machine-readable platform manifest with all endpoints and the self-service flow
- **`/agent.md`** — Human/agent-readable onboarding guide with full code examples
- **`/.well-known/mcp.json`** — MCP server discovery for tool-use agents

---

## Full Setup (Permanent Account)

For production use and permanent data, create a free account. By the end you'll have:

- Created an account
- Generated API credentials
- Made your first API call
- Built a simple AI-powered application

### Prerequisites

Before you begin, make sure you have:

- A valid email address
- A code editor (VS Code recommended)
- curl or Postman for testing
- Python 3.8+ or Node.js 14+ (for SDK examples)

---

## Step 1: Create Your Account (2 minutes)

### Option A: Using curl

```bash
curl -X POST https://api.ainative.studio/api/v1/auth/register \
  -H "Content-Type: application/json" \
  -d '{
    "email": "your-email@example.com",
    "password": "YourSecurePass123!",
    "full_name": "Your Name"
  }'
```

### Option B: Using Python

```python
import requests

response = requests.post(
    "https://api.ainative.studio/api/v1/auth/register",
    json={
        "email": "your-email@example.com",
        "password": "YourSecurePass123!",
        "full_name": "Your Name"
    }
)

user_data = response.json()
access_token = user_data["access_token"]
print(f"Access Token: {access_token}")
```

### Success Response

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "email": "your-email@example.com",
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "token_type": "bearer",
  "expires_in": 28800
}
```

**Save your access token** - you'll need it for the next steps!

---

## Step 2: Verify Your Token (1 minute)

Test that your authentication works:

```bash
curl https://api.ainative.studio/api/v1/auth/me \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

**Expected Response:**
```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "email": "your-email@example.com",
  "full_name": "Your Name",
  "role": "USER",
  "email_verified": false
}
```

---

## Step 3: Create an API Key (2 minutes)

For production applications, use API keys instead of user tokens:

```bash
curl -X POST https://api.ainative.studio/api/v1/api-keys \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My First API Key",
    "expires_in_days": 90
  }'
```

**Response:**
```json
{
  "id": "key_123",
  "api_key": "sk_live_EXAMPLE_not_a_real_key",
  "name": "My First API Key",
  "prefix": "sk_live",
  "expires_at": "2026-05-03T00:00:00Z"
}
```

**Important**: Copy the `api_key` value immediately - it's only shown once!

---

## Step 4: Create Your First Project (2 minutes)

Projects help organize your data and resources:

```bash
curl -X POST https://api.ainative.studio/api/v1/database/projects \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My First AI Project",
    "description": "Getting started with AINative Studio"
  }'
```

**Response:**
```json
{
  "id": "proj_abc123",
  "name": "My First AI Project",
  "description": "Getting started with AINative Studio",
  "created_at": "2026-02-03T12:00:00Z"
}
```

---

## Step 5: Make Your First AI Request (3 minutes)

Let's use the Chat Completion API to interact with an AI model:

### Example: Simple Question

```bash
curl -X POST https://api.ainative.studio/api/v1/chat/completions \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "digitalocean",
    "model": "Llama-3.3-70B-Instruct",
    "messages": [
      {
        "role": "user",
        "content": "Explain what AINative Studio is in one sentence"
      }
    ]
  }'
```

### Python Example

```python
import requests

response = requests.post(
    "https://api.ainative.studio/api/v1/chat/completions",
    headers={"Authorization": f"Bearer {access_token}"},
    json={
        "provider": "digitalocean",
        "model": "Llama-3.3-70B-Instruct",
        "messages": [
            {
                "role": "user",
                "content": "Explain what AINative Studio is in one sentence"
            }
        ]
    }
)

result = response.json()
print(result["choices"][0]["message"]["content"])
```

### Node.js Example

```javascript
const axios = require('axios');

async function chatWithAI() {
  const response = await axios.post(
    'https://api.ainative.studio/api/v1/chat/completions',
    {
      provider: 'digitalocean',
      model: 'Llama-3.3-70B-Instruct',
      messages: [
        {
          role: 'user',
          content: 'Explain what AINative Studio is in one sentence'
        }
      ]
    },
    {
      headers: {
        'Authorization': `Bearer ${accessToken}`,
        'Content-Type': 'application/json'
      }
    }
  );

  console.log(response.data.choices[0].message.content);
}

chatWithAI();
```

---

## Step 6: Use Vector Search (5 minutes)

Store and search documents using semantic similarity:

### A. Insert Documents

```python
import requests

## Generate embeddings and store documents
documents = [
    {
        "id": "doc_1",
        "content": "Python is a high-level programming language",
        "metadata": {"category": "programming"}
    },
    {
        "id": "doc_2",
        "content": "Machine learning is a subset of artificial intelligence",
        "metadata": {"category": "ai"}
    }
]

## In a real application, you'd generate embeddings using an embedding model
## For this example, we'll use placeholder vectors
response = requests.post(
    "https://api.ainative.studio/api/v1/vectors/upsert",
    headers={"Authorization": f"Bearer {access_token}"},
    json={
        "project_id": "proj_abc123",
        "collection": "knowledge_base",
        "vectors": [
            {
                "id": doc["id"],
                "vector": [0.1] * 384,  # Replace with actual embeddings
                "metadata": doc
            }
            for doc in documents
        ]
    }
)

print("Documents inserted:", response.json())
```

### B. Search Documents

```python
## Search for similar documents
search_query = "What is AI?"

response = requests.post(
    "https://api.ainative.studio/api/v1/vectors/search",
    headers={"Authorization": f"Bearer {access_token}"},
    json={
        "project_id": "proj_abc123",
        "collection": "knowledge_base",
        "query_vector": [0.1] * 384,  # Replace with query embedding
        "limit": 5,
        "min_score": 0.7
    }
)

results = response.json()
for result in results["results"]:
    print(f"Score: {result['score']}")
    print(f"Content: {result['metadata']['content']}\n")
```

---

## Common Use Cases

### 1. Chatbot Application

```python
import requests

def create_chatbot(access_token):
    """Simple chatbot using AINative Studio"""
    conversation_history = []

    while True:
        user_input = input("You: ")
        if user_input.lower() == 'quit':
            break

        conversation_history.append({
            "role": "user",
            "content": user_input
        })

        response = requests.post(
            "https://api.ainative.studio/api/v1/chat/completions",
            headers={"Authorization": f"Bearer {access_token}"},
            json={
                "provider": "digitalocean",
                "model": "Llama-3.3-70B-Instruct",
                "messages": conversation_history
            }
        )

        ai_message = response.json()["choices"][0]["message"]
        conversation_history.append(ai_message)

        print(f"AI: {ai_message['content']}\n")

## Run the chatbot
create_chatbot("YOUR_ACCESS_TOKEN")
```

### 2. Document Q&A System

```python
def answer_question(question: str, documents: list, access_token: str):
    """Answer questions based on provided documents"""

    # Create context from documents
    context = "\n\n".join([doc["content"] for doc in documents])

    # Ask AI to answer based on context
    response = requests.post(
        "https://api.ainative.studio/api/v1/chat/completions",
        headers={"Authorization": f"Bearer {access_token}"},
        json={
            "provider": "digitalocean",
            "model": "Llama-3.3-70B-Instruct",
            "messages": [
                {
                    "role": "system",
                    "content": f"Answer questions based on this context:\n{context}"
                },
                {
                    "role": "user",
                    "content": question
                }
            ]
        }
    )

    return response.json()["choices"][0]["message"]["content"]

## Example usage
documents = [
    {"content": "Python was created by Guido van Rossum in 1991"},
    {"content": "Python is known for its simple and readable syntax"}
]

answer = answer_question(
    "Who created Python?",
    documents,
    "YOUR_ACCESS_TOKEN"
)
print(answer)
```

### 3. Code Analysis Tool

```python
def analyze_code(code: str, access_token: str):
    """Analyze code for bugs and improvements"""

    response = requests.post(
        "https://api.ainative.studio/api/v1/chat/completions",
        headers={"Authorization": f"Bearer {access_token}"},
        json={
            "provider": "digitalocean",
            "model": "Llama-3.3-70B-Instruct",
            "messages": [
                {
                    "role": "system",
                    "content": "You are a code review expert. Analyze code for bugs, security issues, and improvements."
                },
                {
                    "role": "user",
                    "content": f"Review this code:\n\n```python\n{code}\n```"
                }
            ]
        }
    )

    return response.json()["choices"][0]["message"]["content"]

## Example usage
code_to_review = """
def process_user_input(user_input):
    result = eval(user_input)
    return result
"""

analysis = analyze_code(code_to_review, "YOUR_ACCESS_TOKEN")
print(analysis)
```

---

## Environment Setup

### Setting Up Environment Variables

Create a `.env` file in your project:

```bash
## .env
AINATIVE_API_KEY=sk_live_EXAMPLE_not_a_real_key
AINATIVE_BASE_URL=https://api.ainative.studio/api/v1
```

### Python Setup

```python
## config.py
import os
from dotenv import load_dotenv

load_dotenv()

AINATIVE_API_KEY = os.getenv("AINATIVE_API_KEY")
AINATIVE_BASE_URL = os.getenv("AINATIVE_BASE_URL")

## api_client.py
import requests
from config import AINATIVE_API_KEY, AINATIVE_BASE_URL

class AINativeClient:
    def __init__(self):
        self.api_key = AINATIVE_API_KEY
        self.base_url = AINATIVE_BASE_URL

    def chat(self, messages, model="Llama-3.3-70B-Instruct"):
        response = requests.post(
            f"{self.base_url}/chat/completions",
            headers={"Authorization": f"Bearer {self.api_key}"},
            json={
                "provider": "digitalocean",
                "model": model,
                "messages": messages
            }
        )
        return response.json()

## Usage
client = AINativeClient()
result = client.chat([{"role": "user", "content": "Hello!"}])
print(result["choices"][0]["message"]["content"])
```

### Node.js Setup

```javascript
// config.js
require('dotenv').config();

module.exports = {
  AINATIVE_API_KEY: process.env.AINATIVE_API_KEY,
  AINATIVE_BASE_URL: process.env.AINATIVE_BASE_URL
};

// api-client.js
const axios = require('axios');
const { AINATIVE_API_KEY, AINATIVE_BASE_URL } = require('./config');

class AINativeClient {
  constructor() {
    this.apiKey = AINATIVE_API_KEY;
    this.baseUrl = AINATIVE_BASE_URL;
  }

  async chat(messages, model = 'Llama-3.3-70B-Instruct') {
    const response = await axios.post(
      `${this.baseUrl}/chat/completions`,
      {
        provider: 'digitalocean',
        model: model,
        messages: messages
      },
      {
        headers: {
          'Authorization': `Bearer ${this.apiKey}`,
          'Content-Type': 'application/json'
        }
      }
    );
    return response.data;
  }
}

// Usage
const client = new AINativeClient();
client.chat([{ role: 'user', content: 'Hello!' }])
  .then(result => console.log(result.choices[0].message.content));
```

---

## Next Steps

Now that you've completed the quick start, here's what to explore next:

1. **Authentication Guide** - Learn about OAuth2, API key rotation, and security best practices
   - See: [Authentication Guide](/docs/getting-started/authentication)

2. **Developer API Reference** - Complete documentation of developer earnings, markup, and analytics
   - See: [API Reference](/docs/api/overview)

3. **Code Examples** - More advanced examples and patterns
   - See: `/docs/examples/`

4. **Troubleshooting** - Common issues and solutions
   - See: [Troubleshooting Guide](/docs/guides/troubleshooting)

5. **Agent Framework** - Build multi-agent systems
   - See: `/docs/guides/AGENT_FRAMEWORK.md`

6. **ZeroDB Guide** - Advanced database operations
   - See: `/docs/examples/ZERODB_EXAMPLES.md`

---

## Getting Help

If you run into issues:

1. Check the [Troubleshooting Guide](/docs/guides/troubleshooting)
2. Search [GitHub Issues](https://github.com/ainative/core/issues)
3. Email support: support@ainative.studio
4. Join our Discord community

---

## API Rate Limits

Your free tier includes:

- 60 requests/minute
- 1,000 requests/hour
- 10,000 requests/day

Need more? Upgrade to Pro or Enterprise:
- Visit: https://ainative.studio/pricing

---

## Security Best Practices

1. **Never commit API keys** to version control
2. **Use environment variables** for credentials
3. **Rotate keys regularly** (every 90 days recommended)
4. **Use HTTPS** for all API calls
5. **Implement rate limiting** in your application
6. **Validate all inputs** before sending to API
7. **Monitor usage** through the dashboard

---

## Quick Reference

### Authentication
```bash
## Register
POST /api/v1/auth/register

## Login
POST /api/v1/auth/login

## Get user info
GET /api/v1/auth/me
```

### Projects
```bash
## List projects
GET /api/v1/database/projects

## Create project
POST /api/v1/database/projects
```

### AI Chat
```bash
## Chat completion
POST /api/v1/chat/completions
```

### Vector Search
```bash
## Insert vectors
POST /api/v1/vectors/upsert

## Search vectors
POST /api/v1/vectors/search
```

---

**Congratulations!** You're now ready to build AI-powered applications with AINative Studio.

---

## Developer Monetization

Want to earn from your applications? Set up developer markup and track earnings:

1. **Configure Markup** - Set your developer markup (0-40%)
   ```bash
   curl -X PUT https://api.ainative.studio/api/v1/developer/markup \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{"developer_markup": 15.0}'
   ```

2. **Track Earnings** - Monitor your earnings
   ```bash
   curl https://api.ainative.studio/api/v1/developer/earnings \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
   ```

3. **Setup Payouts** - Configure Stripe Connect for payouts
   ```bash
   curl -X POST https://api.ainative.studio/api/v1/developer/earnings/connect/onboard \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
   ```

For complete developer earnings documentation, see [API Reference](/docs/api/overview).

---

**Last Updated**: 2026-06-21
**Version**: 1.3

Refs #1015, #4275
