DEVELOPER DOCUMENTATION

Build with TuluAI

Integrate TuluAI services, browse community datasets, and build with Gena. Service credentials stay on TuluAI servers. This page explains developer access without exposing secret values.

Production API base URLhttps://tuluai.app

01 / GETTING STARTED

Start with the public API

Public catalog reads do not require an API key. The production command uses the latest published build. To test changes in this workspace before publishing, run the preview command from Replit Shell.

Production (after publishing current code)
curl https://tuluai.app/api/gena/datasets
Current workspace preview (Replit Shell)
curl "https://${REPLIT_DEV_DOMAIN}:5000/api/gena/datasets"
Example response
{
  "datasets": [
    {
      "id": "tulueng100-reference",
      "title": "TuluEng100",
      "language": "Tulu",
      "license": "..."
    }
  ]
}
Local developmentInstall the repository dependencies with npm install, configure the required environment variables below, then run npm run dev.

02 / GENA DATA API

Datasets, available to build with

Gena makes public datasets discoverable through a small JSON API. Public reads need no credentials. Contributors can publish datasets directly after confirming their rights and public-release intent.

MethodPathAccessPurpose
GET/api/gena/datasetsPublicList public datasets. Returns { datasets }.
GET/api/gena/datasets/{id}PublicFetch metadata and file content for one public dataset.
POST/api/gena/datasetsSigned-in accountPublish a dataset to the public catalog.

Publish a dataset

Send the current signed-in account token in the authorization header. The request must include a license, confirmation that you have the right to share the data, and confirmation that you want it published publicly.

POST /api/gena/datasets
curl -X POST https://tuluai.app/api/gena/datasets \
  -H 'Authorization: Bearer <signed-in-account-token>' \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "Example collection",
    "description": "Short description of the data and its collection.",
    "language": "English",
    "license": "CC BY 4.0",
    "fileName": "examples.jsonl",
    "content": "{\"text\":\"Sample row\"}\n",
    "rightsConfirmed": true,
    "publicReleaseConfirmed": true
  }'
Submission limitsAccepted file extensions are .csv, .json, .jsonl, and .txt. File content is limited to 900,000 bytes. A successful publish returns 201 with status published.

03 / OFFICIAL CLIENTS

Use Gena from your project

Both clients default to https://tuluai.app. Listing and downloading public datasets do not need an API key. Submitting data requires a current signed-in user token.

JAVASCRIPT / TYPESCRIPTMIT

@tuluai/gena-datasets

Install and read
npm install @tuluai/gena-datasets

import { GenaDatasetsClient } from '@tuluai/gena-datasets'

const gena = new GenaDatasetsClient()
const datasets = await gena.listDatasets({ language: 'Tulu' })
const dataset = await gena.getDataset(datasets[0].id)
View on npm
PYTHONMIT

gena-datasets

Install and read
python -m pip install gena-datasets

from gena_datasets import GenaDatasetsClient

gena = GenaDatasetsClient()
datasets = gena.list_datasets(language="Tulu")
dataset = gena.get_dataset(datasets[0]["id"])
View on PyPI

See the Gena library guide for complete install steps, read and download examples, dataset submission, and error handling.

04 / DEVELOPER API KEYS

Authenticate from your server

Create and revoke keys in the developer dashboard. A key is shown only once. Store it in your server-side secret manager and send it as a bearer token. Do not include it in browser or mobile code.

The versioned /api/v1 endpoints below require a key with the matching scope. For automated key management, GET and POST /api/developers/keysplus DELETE /api/developers/keys/{id} use your signed-in TuluAI account token.

ScopeSupported endpointsAccess
gena:readGET /api/v1/gena/datasets, GET /api/v1/gena/datasets/{id}Approved public datasets only.
models:chatPOST /api/v1/chat, POST /api/v1/kenle/chatChat and published assistants.
models:learnPOST /api/v1/kalpleGuided learning.
models:translatePOST /api/v1/translatePattern engine and optional model translation.
models:eruPOST /api/v1/eruEru assistant.
Example model request
curl -X POST https://tuluai.app/api/v1/chat \
  -H 'Authorization: Bearer <your-api-key>' \
  -H 'Content-Type: application/json' \
  -d '{"message":"Hello"}'
Account-bound operationsDataset submissions, private Gena workspace processing, and moderator routes still require a signed-in account and their existing consent or role checks. API keys do not increase endpoint rate limits.

05 / INTEGRATIONS

Runtime and publishing credentials

Runtime credentials are managed by TuluAI. Developers should use scoped TuluAI API keys rather than provider credentials. Never put server keys in source control, client code, or public documentation.

ServiceConfiguration nameWhere it is usedHandling
Model servicesTuluAI-managed server configurationChat, Kalple, translation, Eru, Kenle, and Gena assistant routes.Managed by TuluAI. Developers do not need provider keys to use the public API.
Firebase web appNEXT_PUBLIC_FIREBASE_API_KEY, NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN, NEXT_PUBLIC_FIREBASE_DATABASE_URL, NEXT_PUBLIC_FIREBASE_PROJECT_ID, NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET, NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID, NEXT_PUBLIC_FIREBASE_APP_ID, optional NEXT_PUBLIC_FIREBASE_MEASUREMENT_IDFirebase Authentication, Realtime Database, and Storage.Web configuration is delivered to the browser and is not an authorization secret. Secure data with Firebase Auth and database/storage rules.
Firebase emulatorNEXT_PUBLIC_FIREBASE_EMULATOR_HOSTLocal authenticated UI tests only.Optional local setting. Do not point production users at an emulator.
ReplicateReplit-managed Replicate connectionModerator-only Gena training and prediction route.Uses @replit/connectors-sdk. The provider credential is managed by the connected integration, not a raw environment key in app code.
Kenle rate limitsSESSION_SECRETServer-side hashing for shared chatbot request limits.Private server secret. Not an external API key.
npm publishingNPM_TOKENMaintainer release of the JavaScript SDK.Release-only secret. Never needed by the running site or package consumers.
PyPI publishingPYPI_API_TOKENMaintainer release of the Python SDK.Release-only secret. Never needed by the running site or package consumers.
Firebase CLIFIREBASE_TOKENNot read by the application runtime.Legacy CLI token. Do not use for new deploys; use a supported Google credential flow.

06 / PRODUCT API ROUTES

Server-side model routes

Model credentials stay on TuluAI servers. Product clients call TuluAI routes rather than sending service credentials from the browser.

POST /api/chatChat assistant. Model execution and credentials remain server-side.
POST /api/kalpleGuided Tulu learning and pop-quiz responses.
POST /api/translatePattern engine by default; optional free-model translation.
POST /api/eruEru assistant. Model execution and credentials remain server-side.
POST /api/kenle/chatPublished Kenle assistants grounded in their configured sources.
POST /api/gena/assistantPrivate, selected-workspace assistant. Requires sign-in and consent for external processing.
POST /api/gena/processProcesses selected Gena content after explicit consent.
POST /api/gena/replicateModerator-only model operations through the managed Replicate connection.

Product routes validate their own request shape and rate limits. Treat them as application endpoints, not as a promise of a stable third-party API contract.

07 / GENA NOTEBOOKS

Bring your own compute

Gena stores and organizes data. Notebook code runs in the browser, on the user’s local Gena Runner, or on a Jupyter service the user connects. The application server is not a notebook execution host.

  • Install the desktop Runner from Gena Notebooks for local Python execution.
  • Jupyter connections use the user’s own server URL and access token. Keep that token private and do not commit it.
  • Notebook code runs with the connected computer’s file and network permissions. Review code before running it.

08 / SECURITY

Keep credentials and data safe

  • Keep model-service, session, registry, and deployment secrets server-side in Replit Secrets or an ignored local environment file.
  • Variables prefixed with NEXT_PUBLIC_ are intended for browser configuration. Never use that prefix for a private provider secret.
  • Firebase web API configuration is public by design. Authentication and Firebase rules enforce access; the API key alone is not authorization.
  • Use the Gena dataset clients for public data. Publishing requires a signed-in account, rights confirmation, and public-release confirmation.
  • Gena processing and model training require explicit consent for the selected content. Check current provider pricing before any paid operation.