For Agents
Route LLM queries to the best model from a candidate set, manage routing preferences, and run prompt-optimisation jobs.
Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the Not Diamond API, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.
# On the machine that will host your Jentic One instance:
curl -fsSL https://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | sh# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL https://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | sh
jentic register # connects your agent to your Jentic One instanceJentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.
What an agent can do with Not Diamond API API.
Pick the best LLM for a given prompt across providers using the model selector
Define user-level routing preferences for cost, latency, and quality trade-offs
Submit prompt-optimisation runs and retrieve the improved prompt versions
Track the cost of an optimisation run before applying the result
GET STARTED
Use for: I want to route this prompt to the best available model for cost and quality, Submit a prompt optimisation job for our customer support agent, Check the status of a running prompt optimisation, Retrieve the improved prompt from a completed optimisation run
Not supported: Does not run model inference itself, host models, or store conversation history — use for model routing and prompt optimisation only.
Jentic publishes the only available OpenAPI document for Not Diamond API, keeping it validated and agent-ready.
Jentic publishes the only available OpenAPI specification for Not Diamond API, keeping it validated and agent-ready. Not Diamond is a model-routing and prompt-optimisation platform that picks the best LLM for each query based on quality, cost, and latency targets, then improves prompts over time. The API exposes 8 endpoints covering model selection, user routing preferences, prompt-optimisation runs, and cost tracking. It supports the operational workflow of running an LLM application with multiple candidate providers behind a single intelligent routing layer.
Update or delete user preferences as application requirements change
Poll optimisation status and pull final results once a run completes
Patterns agents use Not Diamond API API for, with concrete tasks.
★ Multi-Model LLM Routing
An LLM application that supports multiple model providers calls Not Diamond's modelSelect endpoint with the prompt and a candidate model list, then routes the actual completion call to the chosen model. This avoids hard-coding a single provider and lets cost or quality preferences shift the choice per query without redeploying the application.
Call modelSelect with a customer support prompt and the candidate set [gpt-4, claude-3-5-sonnet, gemini-1.5-pro], then forward the prompt to the chosen model
Automated Prompt Optimisation
Engineering teams submit a baseline prompt and a small evaluation set to Not Diamond, which iterates on phrasing and structure to improve target metrics. Optimisation runs are asynchronous: submit via /v2/prompt/optimize, poll status, then pull the improved prompt and apply it. Cost is queryable before the team commits to a run.
Submit an optimisation run for the current support-classification prompt, poll until complete, and return the improved prompt with cost and quality deltas
Per-User Routing Preferences
A SaaS product offering AI features to enterprise customers stores routing preferences per user — for example, a regulated tenant prefers self-hosted models while a free-tier user prefers the cheapest option. The user preferences endpoints persist these choices server-side, and modelSelect honours them automatically without per-request preference passing.
Create a user preference favouring open-source models for tenant id 'acme', then run modelSelect for that tenant on a content generation prompt
AI Agent Cost Optimisation
An AI agent operating under a budget delegates model choice to Not Diamond rather than hard-coding gpt-4 for every step. Through Jentic, the agent searches for the model selector operation, loads the schema, and routes each step's prompt to the cheapest model that meets the quality bar — measurable savings on multi-step workflows.
For each step in an agent workflow, call Not Diamond modelSelect with the step's prompt and select the lowest-cost model meeting the quality threshold
8 endpoints — jentic publishes the only available openapi specification for not diamond api, keeping it validated and agent-ready.
METHOD
PATH
DESCRIPTION
/v2/modelRouter/modelSelect
Select the best model for a prompt
/v2/preferences/userPreferenceCreate
Create a routing preference
/v2/preferences/userPreferenceUpdate
Update a routing preference
/v2/prompt/optimize
Submit a prompt optimisation run
/v2/prompt/optimizeStatus/{optimization_run_id}
Check optimisation status
/v2/prompt/optimizeResults/{optimization_run_id}
Retrieve optimisation results
/v2/prompt/optimize/{optimization_run_id}/costs
Get optimisation run cost
/v2/modelRouter/modelSelect
Select the best model for a prompt
/v2/preferences/userPreferenceCreate
Create a routing preference
/v2/preferences/userPreferenceUpdate
Update a routing preference
/v2/prompt/optimize
Submit a prompt optimisation run
/v2/prompt/optimizeStatus/{optimization_run_id}
Check optimisation status
Three things that make agents converge on Jentic-routed access.
Credential isolation
Not Diamond bearer tokens are stored encrypted in the Jentic vault. Agents receive scoped execution access — the raw bearer token never enters the agent's prompt or context.
Intent-based discovery
Agents search Jentic by intent (e.g. 'pick the best model for this prompt') and Jentic returns modelSelect or the optimisation endpoints with their input schema attached.
Time to first call
Direct Not Diamond integration: half a day for auth and async optimisation polling. Through Jentic: minutes — search, load schema, execute.
Alternatives and complements available in the Jentic catalogue.
Portkey AI
Portkey is an AI gateway with routing, caching, and observability across LLM providers.
Choose Portkey when you need a full gateway with caching and observability; choose Not Diamond when the priority is intelligent quality-based model selection.
OpenAI API
OpenAI provides the underlying GPT models that Not Diamond can route to.
Use OpenAI directly when the model is fixed; use Not Diamond when multiple candidate models compete for the same prompt.
Anthropic Messages API
Anthropic Claude is one of the candidate models Not Diamond can route to.
Use Anthropic directly when Claude is the chosen model; use Not Diamond to decide between Claude and other models per query.
Cohere API
Cohere provides another candidate LLM that Not Diamond can route prompts to.
Use Cohere directly when targeting Command models; use Not Diamond when comparing Cohere to other providers per request.
Specific to using Not Diamond API API through Jentic.
Why is there no official OpenAPI spec for Not Diamond API?
Not Diamond does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Not Diamond API via structured tooling. It is validated against the live API and kept up to date. Get started at https://app.jentic.com/sign-up.
What authentication does the Not Diamond API use?
The API uses HTTP bearer authentication. Through Jentic, the bearer token is stored in the vault and injected at execution time, so the agent never sees the raw token in its context.
Can I optimise prompts asynchronously with the Not Diamond API?
Yes. POST /v2/prompt/optimize submits an asynchronous run, GET /v2/prompt/optimizeStatus/{optimization_run_id} polls progress, and /v2/prompt/optimizeResults/{optimization_run_id} returns the improved prompt once the run finishes.
What are the rate limits for the Not Diamond API?
The OpenAPI spec does not declare explicit rate limits. Not Diamond applies plan-based limits in production; consult the Not Diamond dashboard or response headers for current limits.
How do I route a prompt to the best model through Jentic?
Search Jentic for 'route a prompt to the best LLM'. Jentic returns the POST /v2/modelRouter/modelSelect operation with its input schema, including the prompt and candidate model list, so the agent can call it directly.
Can I see the cost of an optimisation run before applying it?
Yes. GET /v2/prompt/optimize/{optimization_run_id}/costs returns the cost for a completed optimisation run, so the team can decide whether to adopt the improved prompt before rolling it out.
/v2/prompt/optimizeResults/{optimization_run_id}
Retrieve optimisation results
/v2/prompt/optimize/{optimization_run_id}/costs
Get optimisation run cost