Initialize the platform
Configure a provider, price its models, and onboard the first organization.
Initialization happens at runtime. Database migrations run automatically at boot; connectors, models, prices, organizations, and credentials are managed through the admin console or the platform API.
The required sequence
Open /admin for the guided browser workflow. The examples below use the
machine API:
export DEEPLINQ_BASE_URL="https://api.example.com"
export DEEPLINQ_ADMIN_USER="admin"
export DEEPLINQ_ADMIN_PASSWORD="..."
admin_curl() {
curl --fail-with-body --user \
"$DEEPLINQ_ADMIN_USER:$DEEPLINQ_ADMIN_PASSWORD" \
-H "Content-Type: application/json" "$@"
}Keep the break-glass admin credential in a password manager. Tenant tokens
cannot acquire the platform-admin role.
1. Register a model connector
This OpenAI example explicitly declares the models the connector may serve and the fallback model used for provider probes and internal calls:
admin_curl -X POST "$DEEPLINQ_BASE_URL/v1/connectors" -d '{
"key": "openai-production",
"name": "OpenAI production",
"kind": "llm",
"type": "openai",
"api_key": "sk-...",
"models": ["gpt-5-mini", "gpt-5.2"],
"default_model": "gpt-5-mini",
"default": true
}'The credential is write-only and sealed with SECRETS_KEY. Registration makes
a minimal real provider call. A rejected key is not stored; an unreachable
provider may be stored with an explicit verification result so the operator can
diagnose network policy.
See connectors for providers, connector kinds, discovery, verification, priorities, and key rotation.
2. Configure model pricing
A model without a pricing row is refused before provider execution. Prices are integer micro-USD per million tokens:
admin_curl -X PUT \
"$DEEPLINQ_BASE_URL/v1/admin/pricing/gpt-5-mini" -d '{
"provider": "openai",
"input_micro_usd_per_mtok": 250000,
"output_micro_usd_per_mtok": 2000000,
"margin_pct": 20,
"tier": "economy"
}'The numbers above are examples, not current provider prices. Copy the provider's published rates when you configure production.
See models and pricing for units, routing tiers, margin, cache-aware billing, and repricing behavior.
3. Create an organization
ORG_RESPONSE="$(
admin_curl -X POST "$DEEPLINQ_BASE_URL/v1/admin/orgs" \
-d '{"name":"Acme Corp"}'
)"
echo "$ORG_RESPONSE"Record the returned organization UUID as ORG_ID. It is the stable tenant key
used by model grants, credits, resources, and audit evidence.
4. Choose an organization credential
For the fastest server-to-server start, create an engine API key:
admin_curl -X POST \
"$DEEPLINQ_BASE_URL/v1/admin/orgs/$ORG_ID/api-keys" -d '{
"name": "Acme backend"
}'Copy the returned sk_dl_... value immediately. Deeplinq shows the plaintext
once and stores only a hash.
For application-managed identity and per-user attribution, bind an issuer and register an asymmetric JWT public key instead. See authentication and organizations.
5. Fund credits
Credits use micro-USD, where 1,000,000 equals one USD:
admin_curl -X POST \
"$DEEPLINQ_BASE_URL/v1/admin/orgs/$ORG_ID/credits" \
-H "Idempotency-Key: acme-initial-credit" \
-d '{"amount_micro_usd":100000000}'This grants USD 100 in engine credit. Always use a stable idempotency key for a retryable funding operation.
6. Grant models
Model access is default-deny:
admin_curl -X POST \
"$DEEPLINQ_BASE_URL/v1/admin/orgs/$ORG_ID/models" \
-d '{"model":"gpt-5-mini"}'Grant auto only when you want intent-based routing:
admin_curl -X POST \
"$DEEPLINQ_BASE_URL/v1/admin/orgs/$ORG_ID/models" \
-d '{"model":"auto"}'The organization must also have concrete entitled models in the tiers the router may select.
7. Verify the tenant path
Using the organization API key returned earlier:
export DEEPLINQ_API_KEY="sk_dl_..."
curl --fail-with-body "$DEEPLINQ_BASE_URL/v1/models" \
-H "Authorization: Bearer $DEEPLINQ_API_KEY"
curl --fail-with-body "$DEEPLINQ_BASE_URL/v1/chat/completions" \
-H "Authorization: Bearer $DEEPLINQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5-mini",
"messages": [{"role":"user","content":"Reply with: ready"}]
}'If the model is not returned by /v1/models, check all three independent
conditions: an enabled connector serves it, a pricing row exists, and the
organization has a model grant.
Recommended next configuration
- set organization and per-user spend limits;
- establish the platform guardrail baseline;
- add an embedding connector before using datasets and RAG;
- configure
PUBLIC_URLbefore adding Gmail or Outlook email connections; - enable and bound the knowledge agent only when grounded multi-step answers are required.