API Reference

Base URL: https://api.embeddingcore.io  |  Version: v1.0.0

How to Use Embedding Core

Embedding Core is a unified vector storage, parsing, and text representation gateway designed specifically for enterprise financial workflows. By abstracting chunking algorithms, document extraction, and vector databases, it allows developers to build semantic search engines, stock advisors, and document query tools in minutes.

Scenario Selection Guide

Choose the database engine that matches your operational needs:

1. Local Sandbox / Development (Memory Store)
Best for testing, unit-test runs, and CI/CD validation. All ingested data is held in-process and does not require running external infrastructure.
2. High-Throughput Search (Qdrant)
Best for production-grade, low-latency similarity queries. Use Qdrant Cloud or a self-hosted instance to scale search operations over millions of chunks.
3. SQL-Native Storage (pgvector)
Best for applications running inside existing PostgreSQL databases (Cloud SQL or AlloyDB). Stores vectors side-by-side with relational user tables.
4. Managed Enterprise scale (Vertex AI Vector Search)
Best for large enterprise setups in Google Cloud. Routes queries through Google's high-performance ANN (Approximate Nearest Neighbor) index endpoints.
5. Warehouse-Native Analytics (BigQuery Vector Search)
Best when searching over massive historical structured data tables. Query matching is done natively using SQL commands over BigQuery datasets.

Step-by-Step Integration Guide

  1. Step 1: Sign in & Retrieve API Key
    Open the Developer Console, authenticate with Google Sign-In, and locate your workspace API key in the API Keys panel.
  2. Step 2: Configure Embedding Credentials (BYOK)
    Create or edit a configuration profile (e.g. default) in the settings panel. Select your embedding model provider (OpenAI, HuggingFace, etc.) and save your key. This ensures your vectors are computed securely.
  3. Step 3: Setup target Vector Database
    In the database settings section, select your target storage engine (e.g., Qdrant, pgvector, or Memory). Input the endpoint connection URL and optional credentials or Google Service Account JSON key, and click Save.
  4. Step 4: Programmatically Ingest Documents
    Trigger the POST /v1/ingest endpoint, passing your Bearer API Key, the document URL (PDF/HTML/TXT), file type, collection name, and target profile. The core fetches the document, parses tables, splits text into clean chunks, generates embeddings, and saves records.
  5. Step 5: Perform Semantic Search
    Trigger the POST /v1/search endpoint with your natural language query. The engine automatically embeds the query using your BYOK model, calculates cosine similarity against the database index, and returns ranked document segments.
  6. Step 6: Explore data in the Console
    Open the Database Explorer panel in the console, select your profile, choose a collection, and inspect stored chunk payloads, metadata attributes, and count metrics.

Authentication

The API uses two separate auth schemes depending on the endpoint:

API Key (Bearer token) — used for programmatic access to /v1/ingest and /v1/search. Found in your workspace console after signing in.

JWT Session Token — used for workspace management endpoints (/v1/workspace/*, /v1/admin/*). Obtained from POST /v1/auth/google.

GET /health

Health check endpoint. Returns service status. No authentication required.

curl https://api.embeddingcore.io/health
{"status": "ok", "service": "level1-embedding-core", "version": "1.0.0"}

POST /v1/ingest
🔑 Requires API Key

Fetches a remote document, parses text/tables, splits into chunks, embeds using your BYOK model, and stores vectors in your configured vector database collection.

ParameterTypeDescription
source_urlstringURL of the document to ingest (PDF, HTML, or plain text)
file_typestringpdf | html | txt | csv | json
collection_namestringName of the vector collection to store vectors. Created if not exists. Default: default_collection
metadataobjectOptional key-value metadata stored alongside each vector chunk payload
config_profilestringOptional. Named configuration profile to load credentials and vector DB settings from. Default: default
curl -X POST https://api.embeddingcore.io/v1/ingest \
  -H "Authorization: Bearer sk-lvl1-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "source_url": "https://sec.gov/q3-2025.pdf",
    "file_type": "pdf",
    "collection_name": "q3_reports",
    "metadata": {"company": "AAPL", "quarter": "Q3-2025"}
  }'
import requests

resp = requests.post(
    "https://api.embeddingcore.io/v1/ingest",
    headers={"Authorization": "Bearer sk-lvl1-your-api-key"},
    json={
        "source_url": "https://sec.gov/q3-2025.pdf",
        "file_type": "pdf",
        "collection_name": "q3_reports",
        "metadata": {"company": "AAPL", "quarter": "Q3-2025"},
    }
)
print(resp.json())
{
  "status": "success",
  "doc_id": "a1b2c3d4-e5f6-...",
  "chunks_processed": 142,
  "collection_name": "q3_reports",
  "provider_used": "huggingface"
}


POST /v1/auth/google

Exchanges a Google Firebase ID Token for a JWT session token and workspace credentials. Creates a new user + workspace on first login.

POST /v1/auth/google
Authorization: Bearer <google_firebase_id_token>
// First login (user created)
{
  "status": "created",
  "session_token": "eyJhbGciOiJIUzI1NiJ9...",
  "is_admin": false,
  "workspace_id": "wk_abc123def",
  "api_key": "sk-lvl1-xxxx",   // shown ONCE on creation
  "subscription_tier": "free"
}

// Returning user
{
  "status": "existing",
  "session_token": "eyJhbGciOiJIUzI1NiJ9...",
  "is_admin": false,
  "workspace_id": "wk_abc123def",
  "subscription_tier": "free"
}

GET /v1/auth/me
🔐 Requires JWT Session Token

Returns the authenticated user's profile and workspace statistics.

curl https://api.embeddingcore.io/v1/auth/me \
  -H "Authorization: Bearer <session_token>"

PUT /v1/workspace/config
🔐 Requires JWT Session Token

Updates your BYOK (Bring Your Own Key) configuration — embedding provider tokens and target vector database connection details.

ParameterTypeDescription
huggingface_tokenstring?HuggingFace API token (starts with hf_)
openai_api_keystring?OpenAI API key (starts with sk-)
qdrant_urlstring?Target vector database endpoint or connection URL. Maps to Qdrant cluster URL, PostgreSQL connection string, Vertex endpoint identifier, or BigQuery path based on the selected provider. Use memory for in-process (testing only)
qdrant_api_keystring?API access key, database password, or connection token for the chosen vector database.
vector_db_providerstring?memory | qdrant | pgvector | vertex_ai | bigquery

POST /v1/billing/checkout

Creates a Stripe checkout session for upgrading to the Standard or Enterprise plan.

Query ParamTypeDescription
workspace_idstringYour workspace ID
planstringpro (Standard tier)