Skip to main content
AINative Studio
Products
Solutions
AI for BusinessNewFor DevelopersPricingDocs
Sign InBook a Call

ZeroDB · NoSQL Tables API

NoSQL document database for AI agents

MongoDB-style JSON documents backed by Postgres. Query with $in, $gte, and $elemMatch — all over one API key. No separate document database needed.

JSON documents in Postgres

Rows stored as row_data JSON — schema optional. Embed arrays and nested objects naturally without a separate document store.

MongoDB-style queries

$in, $gte, $regex, $elemMatch operators; sort, limit, skip, and projection in one POST body.

One API, one key

Same X-API-Key covers tables, vectors, files, memory, and events — no extra databases or credentials to manage.

Get a project in seconds

No dashboard required — provision an instant project with one request:

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

# Response:
# {
#   "api_key":    "zdb_...",
#   "project_id": "proj_...",
#   "expires_at": "2026-08-11T...",
#   "claim_url":  "https://ainative.studio/claim?token=..."
# }

The key is valid for ~72 hours. Visit the claim_url to make it permanent.

Create a table with schema

Define typed columns — or skip the schema and store raw JSON right away. Supported types: string, text, integer, float, boolean, timestamp, array, json.

POST /api/v1/public/zerodb/{project_id}/database/tables
X-API-Key: zdb_...

{
  "table_name": "tasks",
  "schema_definition": {
    "title":       "string",
    "status":      "string",
    "priority":    "integer",
    "labels":      "array",
    "assignee_id": "string",
    "project_id":  "string",
    "created_at":  "timestamp"
  }
}

Insert a document row

POST /api/v1/public/zerodb/{project_id}/database/tables/tasks/rows
X-API-Key: zdb_...

{
  "row_data": {
    "title":       "Ship the onboarding flow",
    "status":      "in_progress",
    "priority":    1,
    "labels":      ["frontend", "q3-goal"],
    "assignee_id": "u_123"
  }
}

MongoDB-style query

Filter, sort, limit, and project in one POST body. Supported operators: $eq $ne $gt $gte $lt $lte $in $nin $contains $regex $icontains $elemMatch

POST /api/v1/public/zerodb/{project_id}/database/tables/tasks/query
X-API-Key: zdb_...

{
  "filter": {
    "status":   { "$in": ["todo", "in_progress"] },
    "priority": { "$lte": 2 }
  },
  "sort":  { "priority": 1 },
  "limit": 50
}

Other row operations

MethodPathDescription
GET/api/v1/public/zerodb/{project_id}/database/tables/tasks/rows/{row_id}Fetch a single document by ID
PUT/api/v1/public/zerodb/{project_id}/database/tables/tasks/rows/{row_id}Replace or partially update a document
DELETE/api/v1/public/zerodb/{project_id}/database/tables/tasks/rows/{row_id}Delete a document by ID
POST/api/v1/public/zerodb/{project_id}/database/tables/tasks/countCount documents — accepts same filter body as query

All routes require X-API-Key: zdb_... in the request header.

Get the ZeroDB NoSQL Tables Step-by-Step Guide

Free PDF workbook: create tables, insert documents, query with MongoDB-style filters, and model embed vs reference — step by step.

We'll only use this to send your guide and occasional ZeroDB updates.

Frequently asked questions

What is ZeroDB's NoSQL database?

ZeroDB's NoSQL API stores each row as a JSON document (row_data) inside Postgres. You define an optional schema with typed fields — string, integer, array, json — and query with MongoDB-style operators like $in, $lte, and $elemMatch. No separate document database needed.

How do I run a MongoDB-style query?

POST /api/v1/public/zerodb/{project_id}/database/tables/{table}/query with a filter object. Supported operators include $eq, $ne, $gt, $gte, $lt, $lte, $in, $nin, $contains, $regex, $icontains, and $elemMatch. Add sort, limit, skip, and projection in the same body.

Do I need a separate NoSQL database alongside ZeroDB?

No. ZeroDB's document API (tables + rows) and its vector API live in the same project under one API key. You can embed labels arrays directly in a task document, query them with $elemMatch, and run a semantic vector search in the same project.

What field types does ZeroDB support?

string, text, integer, float, boolean, timestamp, array, and json. Schema is optional — you can store any JSON in row_data without declaring a schema first.

How do I get started for free?

POST /api/v1/public/instant-db with { "agree_terms": true, "on_behalf_of": "your_user_id" }. You get a temporary API key and project_id back in seconds — no dashboard required. The key is valid for ~72 hours; use the returned claim_url to make it permanent.