API reference
Foundry
Inference: models, chat completions, embeddings, keys, billing profile and request logs.
- Operations
- 119
- Base path
https://os.one.ml/api/v1/foundry- Scopes
adminfoundry:gateway:invokegenesis.billing.readiam:readiam:write- API keys
- 43 refused to API keys · 70 tested with an API key
- SDK
genesis.call('foundry_getActivity', …)· helpers undergenesis.foundry- MCP
- 104 tools; the other 15 through
genesis_call
Operations
| Operation | Endpoint | API key |
|---|---|---|
| Get tenant activity aggregates | GET/activity | Tested with an API key |
| Export tenant activity | GET/activity/export | API keys refused |
| Get supported analytics dimensions and metrics | GET/analytics/meta | Tested with an API key |
| Query tenant analytics | POST/analytics/query | Tested with an API key |
| Annotate text (entities) | POST/annotate | API keys refused |
| Validate a speech generation request | POST/audio/speech | API keys refused |
| Validate an audio transcription request | POST/audio/transcriptions | API keys refused |
| Get current API key metadata | GET/auth/key | Tested with an API key |
| Admit a JSONL batch | POST/batches | Tested with an API key |
| Get batch state | GET/batches/{batch_id} | Tested with an API key |
| Create the server-configured TEST credit checkout | POST/billing/checkout/credits | API keys refused |
| Read the current organization’s paid-credit balance | GET/billing/credits/balance | API keys refused |
| Read the current organization’s native Sandbox billing profile | GET/billing/profile | API keys refused |
| Ensure the current organization’s TEST billing profile | POST/billing/profile/ensure | API keys refused |
| Create a chat completion | POST/chat/completions | Tested with an API key |
| Classify text | POST/classify | API keys refused |
| Make a typed decision (noul, choice, score) on a decision model or the measured decision class | POST/decisions | — |
| Detect objects in an image | POST/detect | API keys refused |
| Embed texts | POST/embed | Tested with an API key |
| Create embeddings | POST/embeddings | Tested with an API key |
| List tenant files | GET/files | Tested with an API key |
| Upload a tenant file | POST/files | Tested with an API key |
| Get file metadata | GET/files/{file_id} | Tested with an API key |
| Delete a tenant file | DELETE/files/{file_id} | Tested with an API key |
| List tenant fine-tuning jobs | GET/fine_tuning/jobs | Tested with an API key |
| Create an admitted fine-tuning job | POST/fine_tuning/jobs | API keys refused |
| Get and refresh a fine-tuning job | GET/fine_tuning/jobs/{job_id} | API keys refused |
| Delete a terminal provider fine-tuning job | DELETE/fine_tuning/jobs/{job_id} | API keys refused |
| Cancel a provider fine-tuning job when contract-backed | POST/fine_tuning/jobs/{job_id}/cancel | API keys refused |
| List provider fine-tuning checkpoints when contract-backed | GET/fine_tuning/jobs/{job_id}/checkpoints | API keys refused |
| List normalized fine-tuning events | GET/fine_tuning/jobs/{job_id}/events | API keys refused |
| List tenant private fine-tuned models | GET/fine_tuning/models | Tested with an API key |
| Get a tenant private fine-tuned model | GET/fine_tuning/models/{model_id} | API keys refused |
| List contract-backed fine-tuning provider operations and executable lanes | GET/fine_tuning/providers | Tested with an API key |
| Forecast a time series | POST/forecast | API keys refused |
| Generate images from a prompt | POST/generate/image | API keys refused |
| Get generation metadata and receipt projection | GET/generation | Tested with an API key |
| Get retained generation content | GET/generation/content | API keys refused |
| Submit idempotent generation feedback | POST/generation/feedback | Tested with an API key |
| Get a generation receipt | GET/generations/{receipt_id} | Tested with an API key |
| Get a generation receipt by request ID | GET/generations/by-request/{request_id} | Tested with an API key |
| Validate an image generation request | POST/images | API keys refused |
| List image-capable models | GET/images/models | Tested with an API key |
| Run Foundry universal inference | POST/infer | Tested with an API key |
| Stream Foundry universal inference | POST/infer/stream | Tested with an API key |
| List tenant API keys | GET/keys | API keys refused |
| Create a tenant API key | POST/keys | API keys refused |
| Delete a tenant API key | DELETE/keys/{key_id} | API keys refused |
| Rotate a tenant API key | POST/keys/{key_id}/rotate | API keys refused |
| Create an Anthropic-compatible message | POST/messages | Tested with an API key |
| List executable models | GET/models | Tested with an API key |
| Predict over tabular rows | POST/predict | API keys refused |
| List tenant provider credential policies | GET/provider-credential-policies | API keys refused |
| Set a tenant provider credential policy | PUT/provider-credential-policies/{provider_id} | API keys refused |
| Summarise your provider credentials and credential policies | GET/provider-credentials/summary | Tested with an API key |
| List tenant BYOK provider keys | GET/provider-keys | API keys refused |
| Register a tenant BYOK provider key | POST/provider-keys | API keys refused |
| Delete a tenant provider key | DELETE/provider-keys/{provider_id} | API keys refused |
| Enable or disable a tenant provider key | PATCH/provider-keys/{provider_id} | API keys refused |
| List the current and retired receipt verification keys | GET/receipts/verification-keys | Tested with an API key |
| Get the current receipt verification key | GET/receipts/verification-keys/current | Tested with an API key |
| Recommend items | POST/recommend | API keys refused |
| Compare registry model dossiers | GET/registry/compare | Tested with an API key |
| List registry facets | GET/registry/facets | Tested with an API key |
| List registry labs | GET/registry/labs | Tested with an API key |
| Get a registry lab dossier | GET/registry/labs/{lab_id} | Tested with an API key |
| Get current model-base metadata | GET/registry/model-base/current | Tested with an API key |
| List model-base releases | GET/registry/model-base/releases | Tested with an API key |
| List registry models | GET/registry/models | Tested with an API key |
| Get a registry model | GET/registry/models/{canonical_model_id} | Tested with an API key |
| List benchmark results for a model | GET/registry/models/{canonical_model_id}/benchmarks | Tested with an API key |
| Get a model dossier | GET/registry/models/{canonical_model_id}/dossier | Tested with an API key |
| List model access offers | GET/registry/models/{canonical_model_id}/offers | Tested with an API key |
| List the sources behind a model record | GET/registry/models/{canonical_model_id}/sources | Tested with an API key |
| List registry provenance | GET/registry/provenance | — |
| List registry providers | GET/registry/providers | Tested with an API key |
| Get a registry provider | GET/registry/providers/{provider_id} | Tested with an API key |
| Get a provider dossier | GET/registry/providers/{provider_id}/dossier | Tested with an API key |
| List registry sources | GET/registry/sources | — |
| Read your organization's inference request logs | GET/request-logs | Tested with an API key |
| Validate a rerank request | POST/rerank | API keys refused |
| Create an OpenAI Responses response | POST/responses | Tested with an API key |
| Build an eval run from per-item outcomes | POST/routing/evals/aggregate | Tested with an API key |
| Check whether an eval run supports a public claim | POST/routing/evals/claim-readiness | Tested with an API key |
| Build a dry-run routing eval plan | POST/routing/evals/plan | Tested with an API key |
| Aggregate outcomes for a planned suite | POST/routing/evals/plan/aggregate | Tested with an API key |
| Build a plan and runner-ready jobs (no provider execution) | POST/routing/evals/plan/dispatch | Tested with an API key |
| Aggregate runner reports for a dispatched plan | POST/routing/evals/plan/dispatch/aggregate | Tested with an API key |
| Explain a persisted routing invocation | GET/routing/invocations/{id}/explain | Tested with an API key |
| Preview routing without provider execution | POST/routing/preview | Tested with an API key |
| Segment an image | POST/segment | API keys refused |
| Synthesize speech from text | POST/speak | API keys refused |
| Realtime speech socket (Eleven v4 Turbo) | GET/speak/stream | — |
| Stream speech as it is synthesized (Eleven v4 Turbo) | POST/speak/stream | — |
| Summarize text | POST/summarize | API keys refused |
| Benchmark models (estimates) | POST/tools/benchmark | Tested with an API key |
| Compare models for a prompt (estimates) | POST/tools/compare | Tested with an API key |
| Estimate the cost of a call | POST/tools/cost-estimate | Tested with an API key |
| Transcribe audio | POST/transcribe | API keys refused |
| Realtime transcription socket (Deepgram Nova-3) | GET/transcribe/stream | — |
| List snapshot-stable Registry V2 benchmark evidence | GET/v2/registry/benchmarks | Tested with an API key |
| Compare V2 registry model dossiers | GET/v2/registry/compare | Tested with an API key |
| List V2 registry facets | GET/v2/registry/facets | Tested with an API key |
| List V2 registry labs | GET/v2/registry/labs | Tested with an API key |
| Get a V2 registry lab dossier | GET/v2/registry/labs/{lab_id} | Tested with an API key |
| Get current V2 model-base metadata | GET/v2/registry/model-base/current | Tested with an API key |
| List V2 model-base releases | GET/v2/registry/model-base/releases | Tested with an API key |
| Get an unambiguous V2 model dossier | GET/v2/registry/model-dossiers/{canonical_model_id} | Tested with an API key |
| List Registry Intelligence V2 models | GET/v2/registry/models | Tested with an API key |
| Get a Registry Intelligence V2 model dossier | GET/v2/registry/models/{canonical_model_id} | Tested with an API key |
| List V2 registry provenance | GET/v2/registry/provenance | Tested with an API key |
| List Registry Intelligence V2 providers | GET/v2/registry/providers | Tested with an API key |
| Get a V2 provider dossier | GET/v2/registry/providers/{provider_id} | Tested with an API key |
| List V2 registry sources | GET/v2/registry/sources | Tested with an API key |
| Validate a video generation request | POST/videos | API keys refused |
| Validate a video job lookup | GET/videos/{id} | API keys refused |
| Validate a video content lookup | GET/videos/{id}/content | API keys refused |
| Get a workload's status | GET/workloads/{workload_id}/status | API keys refused |
| Terminate a workload | POST/workloads/{workload_id}/terminate | API keys refused |
Activity
Get tenant activity aggregates
GET/v1/foundry/activity
Requires Foundry's admin (management) scope (openrouter_compatibility.rs authenticate_management). The gateway delegates only foundry:gateway:invoke, so it answers every caller 403 SCOPE_MISSING (required_scope admin) until Foundry grants tenant callers this family.
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/activity" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_getActivity'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_getActivity",
"arguments": {}
}
}Export tenant activity
GET/v1/foundry/activity/export
Requires Foundry's admin (management) scope (openrouter_compatibility.rs authenticate_management). The gateway delegates only foundry:gateway:invoke, so it answers every caller 403 SCOPE_MISSING (required_scope admin) until Foundry grants tenant callers this family.
Parameters
formatquery · stringrequired
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/activity/export?format=$FORMAT" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_exportActivity', {
format: '<format>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_exportActivity",
"arguments": {
"format": "<format>"
}
}
}Analytics
Get supported analytics dimensions and metrics
GET/v1/foundry/analytics/meta
Requires Foundry's admin (management) scope (openrouter_compatibility.rs authenticate_management). The gateway delegates only foundry:gateway:invoke, so it answers every caller 403 SCOPE_MISSING (required_scope admin) until Foundry grants tenant callers this family.
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/analytics/meta" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_getAnalyticsMeta'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_getAnalyticsMeta",
"arguments": {}
}
}Query tenant analytics
POST/v1/foundry/analytics/query
Aggregate request-log analytics for your own organization (all projects and environments), served by Foundry's native reporting receiver (POST /v1/analytics/query). Read-only and not billed. The query body is bounded (64 KiB) and validated by Foundry, and the result is bound to the caller's organization. Works with a Console login session or an organization API key holding foundry:read; either way the gateway delegates a one-scope foundry:reporting:read child. gateway/src/foundry-reporting-read.ts.
Request body application/json
metricsstring[]requireddimensionsstring[]filtersobject[]granularity"minute" | "hour" | "day" | "month"time_rangeobject
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/analytics/query" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"metrics": [
"string"
]
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_queryAnalytics', {
body: {
metrics: [
'string',
],
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_queryAnalytics",
"arguments": {
"body": {
"metrics": [
"string"
]
}
}
}
}Annotate
Annotate text (entities)
POST/v1/foundry/annotate
Dispatches a model and is billed from Stripe-funded prepaid Foundry credits only: for a Console (pf_console) or One app (pf_one) login the gateway delegates foundry:gateway:invoke:prepaid, and Foundry reserves and settles the call against the organization's prepaid credit ledger, refusing it when the credits do not cover it. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Request body application/json
modelstringrequiredtextstringrequired
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/annotate" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "string",
"text": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_annotateText', {
body: {
model: 'string',
text: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_annotateText",
"arguments": {
"body": {
"model": "string",
"text": "string"
}
}
}
}Audio
Validate a speech generation request
POST/v1/foundry/audio/speech
Request body application/json
modelstringrequiredpromptstringproviderobjectprovider.orderstring[]provider.onlystring[]provider.ignorestring[]provider.allow_fallbacksbooleanprovider.require_parametersbooleanprovider.zdrbooleanprovider.data_collection"allow" | "deny"provider.sortanyprovider.max_priceobject
Responses
- 501The request is validated, but this modality transport is not executable.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/audio/speech" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_createAudioSpeech', {
body: {
model: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "foundry_createAudioSpeech",
"arguments": {
"body": {
"model": "string"
}
}
}
}
}Validate an audio transcription request
POST/v1/foundry/audio/transcriptions
Request body application/json
modelstringrequiredpromptstringproviderobjectprovider.orderstring[]provider.onlystring[]provider.ignorestring[]provider.allow_fallbacksbooleanprovider.require_parametersbooleanprovider.zdrbooleanprovider.data_collection"allow" | "deny"provider.sortanyprovider.max_priceobject
Responses
- 501The request is validated, but this modality transport is not executable.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/audio/transcriptions" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_createAudioTranscription', {
body: {
model: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_createAudioTranscription",
"arguments": {
"body": {
"model": "string"
}
}
}
}Auth
Get current API key metadata
GET/v1/foundry/auth/key
Metadata of the Foundry credential the call carried: through the gateway, the delegated Foundry identity of your login (tenant, project, scopes). Not billed. Works with a Console login session (pf_console), for which the gateway delegates foundry:gateway:invoke. One app sign-ins (pf_one) are refused by Foundry: their prepaid child covers only billed inference. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/auth/key" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_getCurrentApiKey'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_getCurrentApiKey",
"arguments": {}
}
}Batches
Admit a JSONL batch
POST/v1/foundry/batches
Requires Foundry's admin (management) scope (openrouter_compatibility.rs authenticate_management). The gateway delegates only foundry:gateway:invoke, so it answers every caller 403 SCOPE_MISSING (required_scope admin) until Foundry grants tenant callers this family.
Request body application/json
input_file_idstringrequiredendpoint"/v1/chat/completions" | "/v1/responses"requiredcompletion_window"24h"requiredmetadataobject
Responses
- 200Successful response.
Response fields
idstringrequiredstatusstringrequiredendpointstringinput_file_idstringoutput_file_idstring | nullrequest_countsobjectmetadataobject
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/batches" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input_file_id": "string",
"endpoint": "/v1/chat/completions",
"completion_window": "24h"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_createBatch', {
body: {
input_file_id: 'string',
endpoint: '/v1/chat/completions',
completion_window: '24h',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_createBatch",
"arguments": {
"body": {
"input_file_id": "string",
"endpoint": "/v1/chat/completions",
"completion_window": "24h"
}
}
}
}Get batch state
GET/v1/foundry/batches/{batch_id}
Requires Foundry's admin (management) scope (openrouter_compatibility.rs authenticate_management). The gateway delegates only foundry:gateway:invoke, so it answers every caller 403 SCOPE_MISSING (required_scope admin) until Foundry grants tenant callers this family.
Parameters
batch_idpath · stringrequired
Responses
- 200Successful response.
Response fields
idstringrequiredstatusstringrequiredendpointstringinput_file_idstringoutput_file_idstring | nullrequest_countsobjectmetadataobject
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/batches/$BATCH_ID" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_getBatch', {
batch_id: '<batch_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_getBatch",
"arguments": {
"batch_id": "<batch_id>"
}
}
}Billing
Create the server-configured TEST credit checkout
POST/v1/foundry/billing/checkout/credits
Original Console human only. The verified organization and Sandbox context are resolved server-side. Preserve the same operation key after an unknown POST; reconcile before retrying.
Parameters
Idempotency-Keyheader · stringrequiredPersisted per-operation key; never create a replacement for an unknown result.
Request body application/json
A JSON object; see the description above.
Responses
- 200Native billing response
Response fields
intent_idstringrequiredstripe_checkout_session_idstringrequiredcheckout_urlstring (uri)status"paid" | "processing"stripe_payment_intent_idstring
- 400Billing refusal; error.outcome says whether the operation was dispatched.
- 503Billing refusal; error.outcome says whether the operation was dispatched.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/billing/checkout/credits" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('foundry_createNativeCreditCheckout', {
body: {},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "foundry_createNativeCreditCheckout",
"arguments": {
"body": {},
"idempotency_key": "<a stable key per change>"
}
}
}
}Read the current organization’s paid-credit balance
GET/v1/foundry/billing/credits/balance
Read-only. A signed-in Console session, or an org API key holding genesis.billing.read (a key without it gets 403 SCOPE_MISSING with required_scope genesis.billing.read). The organization and environment come from the verified selection, never from the request: a Sandbox selection reads the organization's own Sandbox ledger (foundry_account_id is the organization); where Foundry Live is on for the organization, a Live key reads the {org}:live account, otherwise a Live selection is refused.
Responses
- 200Native billing response
Response fields
foundry_account_idstringrequiredavailable_microdollarsintegerrequiredmin 0 · max 9007199254740991
granted_microdollarsintegerrequiredmin 0 · max 9007199254740991
reserved_microdollarsintegerrequiredmin 0 · max 9007199254740991
reserved_overage_microdollarsintegerrequiredmin 0 · max 9007199254740991
settlement_owner"foundry"requiredlaunch_listedbooleanrequiredLegacy disposable-sandbox metadata; false does not deny a native customer.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/billing/credits/balance" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_readNativeCreditBalance'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_readNativeCreditBalance",
"arguments": {}
}
}Read the current organization’s native Sandbox billing profile
GET/v1/foundry/billing/profile
Read-only. A signed-in Console session, or an org API key holding genesis.billing.read (a key without it gets 403 SCOPE_MISSING with required_scope genesis.billing.read). The organization and environment come from the verified selection, never from the request. Returns the actual profile and fresh canEnsure decision; it creates no customer or payment. A key's profile never carries a Stripe account or customer id (Live returns both as null) and always reports canEnsure false (ensure and checkout need the person's own Console login). Where Foundry Live is on for the organization, a Live key reads the {org}:live account (status internal_allowance); otherwise a Live selection is refused.
Responses
- 200Current organization billing profile
Response fields
schemaVersion1requiredstatus"ready" | "pending" | "attention_required"requiredorganizationIdstringrequiredbillingAccountIdstringrequiredenvironmentId"sandbox"requiredstripeAccountIdstringPresent for a human Console session only; never returned to an org API key.
stripeCustomerIdstring | nullPresent for a human Console session only; never returned to an org API key.
livemodefalserequiredcanEnsurebooleanrequired
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/billing/profile" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_readBillingProfile'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_readBillingProfile",
"arguments": {}
}
}Ensure the current organization’s TEST billing profile
POST/v1/foundry/billing/profile/ensure
Original Console human only. The verified organization and Sandbox context are resolved server-side. Preserve the same operation key after an unknown POST; reconcile before retrying.
Parameters
Idempotency-Keyheader · stringrequiredPersisted per-operation key; never create a replacement for an unknown result.
Request body application/json
A JSON object; see the description above.
Responses
- 200Native billing response
Response fields
schemaVersion1requiredstatus"ready" | "pending" | "attention_required"requiredorganizationIdstringrequiredbillingAccountIdstringrequiredenvironmentId"sandbox"requiredstripeAccountIdstringPresent for a human Console session only; never returned to an org API key.
stripeCustomerIdstring | nullPresent for a human Console session only; never returned to an org API key.
livemodefalserequiredcanEnsurebooleanrequired
- 400Billing refusal; error.outcome says whether the operation was dispatched.
- 503Billing refusal; error.outcome says whether the operation was dispatched.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/billing/profile/ensure" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('foundry_ensureBillingProfile', {
body: {},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "foundry_ensureBillingProfile",
"arguments": {
"body": {},
"idempotency_key": "<a stable key per change>"
}
}
}
}Chat
Create a chat completion
POST/v1/foundry/chat/completions
Request body application/json
modelstringmodelsstring[]messagesobject[]requiredmessages[].[].rolestringrequiredmessages[].[].contentanyrequiredstreambooleanproviderobjectprovider.orderstring[]provider.onlystring[]provider.ignorestring[]provider.allow_fallbacksbooleanprovider.require_parametersbooleanprovider.zdrbooleanprovider.data_collection"allow" | "deny"provider.sortanyprovider.max_priceobject
Responses
- 200Successful response.
Response fields
idstringrequiredmodelstringchoicesobject[]requiredusageobjectusage.prompt_tokensintegermin 0
usage.completion_tokensintegermin 0
usage.total_tokensintegermin 0
usage.costnumbermin 0
foundryobjectfoundry.request_idstringfoundry.receipt_idstringfoundry.billing_lane"pay_as_you_go" | "subscription_entitled" | "byok"
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/chat/completions" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"messages": []
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_createChatCompletion', {
body: {
messages: [],
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_createChatCompletion",
"arguments": {
"body": {
"messages": []
}
}
}
}Classify
Classify text
POST/v1/foundry/classify
Dispatches a model and is billed from Stripe-funded prepaid Foundry credits only: for a Console (pf_console) or One app (pf_one) login the gateway delegates foundry:gateway:invoke:prepaid, and Foundry reserves and settles the call against the organization's prepaid credit ledger, refusing it when the credits do not cover it. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Request body application/json
modelstringrequiredtextstringrequired
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/classify" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "string",
"text": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_classifyText', {
body: {
model: 'string',
text: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_classifyText",
"arguments": {
"body": {
"model": "string",
"text": "string"
}
}
}
}Decisions
Make a typed decision (noul, choice, score) on a decision model or the measured decision class
POST/v1/foundry/decisions
Request body application/json
modelstringmax length 128
route_class"decision"stateanyrequiredWhat the decision is about: a string, object or array.
data_policy"zdr" | "standard"Chat decision models only. zdr (the default): zero-retention, non-collecting routes only and no routing training. standard: the chat route's own policy; routing training still needs the caller's X-Foundry-Training subject. Pinned models always run zero-retention (standard is refused).
questionsobjectrequired
Responses
- 200Successful response.
Response fields
idstringrequiredobject"decision"requiredmodelstringrequiredanswersobjectrequiredusageobjectrequiredusage.input_tokensintegerusage.output_tokensintegerfoundryobject
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/decisions" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"state": "string",
"questions": {}
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_createDecision', {
body: {
state: 'string',
questions: {},
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_createDecision",
"arguments": {
"body": {
"state": "string",
"questions": {}
}
}
}
}Detect
Detect objects in an image
POST/v1/foundry/detect
Dispatches a model and is billed from Stripe-funded prepaid Foundry credits only: for a Console (pf_console) or One app (pf_one) login the gateway delegates foundry:gateway:invoke:prepaid, and Foundry reserves and settles the call against the organization's prepaid credit ledger, refusing it when the credits do not cover it. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Request body application/json
modelstringrequiredimageobject | objectrequired{"url": ...}or{"data": base64, "media_type": ...}(convenience.rs ImageInput)
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/detect" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "string",
"image": {
"url": "string"
}
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_detectObjects', {
body: {
model: 'string',
image: {
url: 'string',
},
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_detectObjects",
"arguments": {
"body": {
"model": "string",
"image": {
"url": "string"
}
}
}
}
}Embed
Embed texts
POST/v1/foundry/embed
Dispatches a model and is billed from Stripe-funded prepaid Foundry credits only: for a Console (pf_console) or One app (pf_one) login the gateway delegates foundry:gateway:invoke:prepaid, and Foundry reserves and settles the call against the organization's prepaid credit ledger, refusing it when the credits do not cover it. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Request body application/json
modelstringrequiredinputstring[]required
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/embed" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "string",
"input": []
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_embedTexts', {
body: {
model: 'string',
input: [],
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_embedTexts",
"arguments": {
"body": {
"model": "string",
"input": []
}
}
}
}Embeddings
Create embeddings
POST/v1/foundry/embeddings
Request body application/json
modelstringrequiredinputanyrequireddimensionsintegermin 1
Responses
- 200Successful response.
Response fields
objectstringmodelstringdataobject[]requiredusageobjectusage.prompt_tokensintegermin 0
usage.completion_tokensintegermin 0
usage.total_tokensintegermin 0
usage.costnumbermin 0
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/embeddings" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "string",
"input": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_createEmbedding', {
body: {
model: 'string',
input: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_createEmbedding",
"arguments": {
"body": {
"model": "string",
"input": "string"
}
}
}
}Files
List tenant files
GET/v1/foundry/files
Responses
- 200Successful response.
Response fields
dataobject[]requireddata[].[].idstringrequireddata[].[].type"file"requireddata[].[].filenamestringrequireddata[].[].mime_typestringrequireddata[].[].size_bytesintegerrequiredmin 0
data[].[].downloadablebooleanrequireddata[].[].created_atanyrequiredhas_morebooleancursorstring | null
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/files" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listFiles'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_listFiles",
"arguments": {}
}
}Upload a tenant file
POST/v1/foundry/files
Request bodies sent through https://os.one.ml/api are limited to 2 MiB.
Request body multipart/form-data
filestring (binary)required
Responses
- 200Successful response.
Response fields
idstringrequiredtype"file"requiredfilenamestringrequiredmime_typestringrequiredsize_bytesintegerrequiredmin 0
downloadablebooleanrequiredcreated_atanyrequired
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/files" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: multipart/form-data" \
--data-binary @body.binimport { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_uploadFile', {
body: '<bytes>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_uploadFile",
"arguments": {
"body": "<bytes>"
}
}
}Get file metadata
GET/v1/foundry/files/{file_id}
Parameters
file_idpath · stringrequired
Responses
- 200Successful response.
Response fields
idstringrequiredtype"file"requiredfilenamestringrequiredmime_typestringrequiredsize_bytesintegerrequiredmin 0
downloadablebooleanrequiredcreated_atanyrequired
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/files/$FILE_ID" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_getFile', {
file_id: '<file_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_getFile",
"arguments": {
"file_id": "<file_id>"
}
}
}Delete a tenant file
DELETE/v1/foundry/files/{file_id}
Parameters
file_idpath · stringrequired
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X DELETE "https://os.one.ml/api/v1/foundry/files/$FILE_ID" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_deleteFile', {
file_id: '<file_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_deleteFile",
"arguments": {
"file_id": "<file_id>"
}
}
}Fine tuning
List tenant fine-tuning jobs
GET/v1/foundry/fine_tuning/jobs
Responses
- 200Successful response.
Response fields
dataobject[]requireddata[].[].idstringrequireddata[].[].object"fine_tuning.job"requireddata[].[].providerstringrequireddata[].[].provider_job_idstring | nulldata[].[].modelstringrequireddata[].[].fine_tuned_modelstring | nulldata[].[].training_filestringrequireddata[].[].validation_filestring | nulldata[].[].status"validating" | "admitted" | "dispatching" | "queued" | "running" | "succeeded" | "failed" | "cancelling" | "cancelled" | "deleting" | "deleted"requireddata[].[].commercial_lane"byok"requireddata[].[].billing_state"pending" | "admitted" | "not_billable" | "receipt_committed" | "failed"requireddata[].[].provider_cost_evidenceobjectdata[].[].receiptobjectdata[].[].errorobject
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/fine_tuning/jobs" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listFineTuningJobs'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_listFineTuningJobs",
"arguments": {}
}
}Create an admitted fine-tuning job
POST/v1/foundry/fine_tuning/jobs
Request body application/json
provider"together"requiredmodelstringrequiredmin length 1 · max length 512
training_filestringrequiredvalidation_filestring | nullworkspace_idstring | nullcommercial_lane"byok"requiredn_epochsinteger | nullmin 1
n_checkpointsinteger | nullmin 0
n_evalsinteger | nullmin 0
batch_sizeinteger | nullmin 1
learning_ratenumber | nullsuffixstring | nullmin length 1 · max length 64
loraboolean | null
Responses
- 200Idempotent replay.
Response fields
idstringrequiredobject"fine_tuning.job"requiredproviderstringrequiredprovider_job_idstring | nullmodelstringrequiredfine_tuned_modelstring | nulltraining_filestringrequiredvalidation_filestring | nullstatus"validating" | "admitted" | "dispatching" | "queued" | "running" | "succeeded" | "failed" | "cancelling" | "cancelled" | "deleting" | "deleted"requiredcommercial_lane"byok"requiredbilling_state"pending" | "admitted" | "not_billable" | "receipt_committed" | "failed"requiredprovider_cost_evidenceobjectreceiptobjecterrorobject
- 202Provider job accepted.
Response fields
idstringrequiredobject"fine_tuning.job"requiredproviderstringrequiredprovider_job_idstring | nullmodelstringrequiredfine_tuned_modelstring | nulltraining_filestringrequiredvalidation_filestring | nullstatus"validating" | "admitted" | "dispatching" | "queued" | "running" | "succeeded" | "failed" | "cancelling" | "cancelled" | "deleting" | "deleted"requiredcommercial_lane"byok"requiredbilling_state"pending" | "admitted" | "not_billable" | "receipt_committed" | "failed"requiredprovider_cost_evidenceobjectreceiptobjecterrorobject
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/fine_tuning/jobs" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"provider": "together",
"model": "string",
"training_file": "string",
"commercial_lane": "byok"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_createFineTuningJob', {
body: {
provider: 'together',
model: 'string',
training_file: 'string',
commercial_lane: 'byok',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_createFineTuningJob",
"arguments": {
"body": {
"provider": "together",
"model": "string",
"training_file": "string",
"commercial_lane": "byok"
}
}
}
}Get and refresh a fine-tuning job
GET/v1/foundry/fine_tuning/jobs/{job_id}
Parameters
job_idpath · stringrequired
Responses
- 200Successful response.
Response fields
idstringrequiredobject"fine_tuning.job"requiredproviderstringrequiredprovider_job_idstring | nullmodelstringrequiredfine_tuned_modelstring | nulltraining_filestringrequiredvalidation_filestring | nullstatus"validating" | "admitted" | "dispatching" | "queued" | "running" | "succeeded" | "failed" | "cancelling" | "cancelled" | "deleting" | "deleted"requiredcommercial_lane"byok"requiredbilling_state"pending" | "admitted" | "not_billable" | "receipt_committed" | "failed"requiredprovider_cost_evidenceobjectreceiptobjecterrorobject
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/fine_tuning/jobs/$JOB_ID" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_getFineTuningJob', {
job_id: '<job_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_getFineTuningJob",
"arguments": {
"job_id": "<job_id>"
}
}
}Delete a terminal provider fine-tuning job
DELETE/v1/foundry/fine_tuning/jobs/{job_id}
Parameters
job_idpath · stringrequired
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X DELETE "https://os.one.ml/api/v1/foundry/fine_tuning/jobs/$JOB_ID" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_deleteFineTuningJob', {
job_id: '<job_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_deleteFineTuningJob",
"arguments": {
"job_id": "<job_id>"
}
}
}Cancel a provider fine-tuning job when contract-backed
POST/v1/foundry/fine_tuning/jobs/{job_id}/cancel
Parameters
job_idpath · stringrequired
Responses
- 200Successful response.
Response fields
idstringrequiredobject"fine_tuning.job"requiredproviderstringrequiredprovider_job_idstring | nullmodelstringrequiredfine_tuned_modelstring | nulltraining_filestringrequiredvalidation_filestring | nullstatus"validating" | "admitted" | "dispatching" | "queued" | "running" | "succeeded" | "failed" | "cancelling" | "cancelled" | "deleting" | "deleted"requiredcommercial_lane"byok"requiredbilling_state"pending" | "admitted" | "not_billable" | "receipt_committed" | "failed"requiredprovider_cost_evidenceobjectreceiptobjecterrorobject
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/fine_tuning/jobs/$JOB_ID/cancel" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_cancelFineTuningJob', {
job_id: '<job_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_cancelFineTuningJob",
"arguments": {
"job_id": "<job_id>"
}
}
}List provider fine-tuning checkpoints when contract-backed
GET/v1/foundry/fine_tuning/jobs/{job_id}/checkpoints
Parameters
job_idpath · stringrequired
Responses
- 200Successful response.
Response fields
dataobject[]required
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/fine_tuning/jobs/$JOB_ID/checkpoints" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listFineTuningCheckpoints', {
job_id: '<job_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_listFineTuningCheckpoints",
"arguments": {
"job_id": "<job_id>"
}
}
}List normalized fine-tuning events
GET/v1/foundry/fine_tuning/jobs/{job_id}/events
Parameters
job_idpath · stringrequired
Responses
- 200Successful response.
Response fields
dataobject[]required
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/fine_tuning/jobs/$JOB_ID/events" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listFineTuningEvents', {
job_id: '<job_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_listFineTuningEvents",
"arguments": {
"job_id": "<job_id>"
}
}
}List tenant private fine-tuned models
GET/v1/foundry/fine_tuning/models
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/fine_tuning/models" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listFineTunedPrivateModels'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_listFineTunedPrivateModels",
"arguments": {}
}
}Get a tenant private fine-tuned model
GET/v1/foundry/fine_tuning/models/{model_id}
Parameters
model_idpath · stringrequired
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/fine_tuning/models/$MODEL_ID" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_getFineTunedPrivateModel', {
model_id: '<model_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_getFineTunedPrivateModel",
"arguments": {
"model_id": "<model_id>"
}
}
}List contract-backed fine-tuning provider operations and executable lanes
GET/v1/foundry/fine_tuning/providers
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/fine_tuning/providers" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listFineTuningProviders'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_listFineTuningProviders",
"arguments": {}
}
}Forecast
Forecast a time series
POST/v1/foundry/forecast
Dispatches a model and is billed from Stripe-funded prepaid Foundry credits only: for a Console (pf_console) or One app (pf_one) login the gateway delegates foundry:gateway:invoke:prepaid, and Foundry reserves and settles the call against the organization's prepaid credit ledger, refusing it when the credits do not cover it. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Request body application/json
modelstringrequiredtimestampsinteger[]requiredvaluesnumber[][]requiredfeaturesstring[]
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/forecast" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "string",
"timestamps": [],
"values": []
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_forecastSeries', {
body: {
model: 'string',
timestamps: [],
values: [],
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_forecastSeries",
"arguments": {
"body": {
"model": "string",
"timestamps": [],
"values": []
}
}
}
}Generate
Generate images from a prompt
POST/v1/foundry/generate/image
Dispatches a model and is billed from Stripe-funded prepaid Foundry credits only: for a Console (pf_console) or One app (pf_one) login the gateway delegates foundry:gateway:invoke:prepaid, and Foundry reserves and settles the call against the organization's prepaid credit ledger, refusing it when the credits do not cover it. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Request body application/json
modelstringrequiredpromptstringrequirednintegermin 1
sizestring
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/generate/image" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "string",
"prompt": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_generateImage', {
body: {
model: 'string',
prompt: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_generateImage",
"arguments": {
"body": {
"model": "string",
"prompt": "string"
}
}
}
}Generation
Get generation metadata and receipt projection
GET/v1/foundry/generation
Generation metadata and receipt projection for your own request id. Not billed. Works with a Console login session (pf_console), for which the gateway delegates foundry:gateway:invoke. One app sign-ins (pf_one) are refused by Foundry: their prepaid child covers only billed inference. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Parameters
idquery · stringrequired
Responses
- 200Successful response.
Response fields
dataobjectrequireddata.idstringdata.request_idstringdata.modelstringdata.provider_namestringdata.is_byokbooleandata.total_costnumberdata.foundry_receiptobject
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/generation?id=$ID" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_getGeneration', {
id: '<id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_getGeneration",
"arguments": {
"id": "<id>"
}
}
}Get retained generation content
GET/v1/foundry/generation/content
Retained prompt and output for one of your own generations (id), scoped to your organization. Not billed. Foundry admits foundry:gateway:invoke or management (openrouter_generations.rs authenticate_invoke_or_management): a Console login session gets the delegated foundry:gateway:invoke child, and an organization API key needs the foundry:invoke permission. 404 when the id is not yours; 403 content_not_retained when Foundry kept no content for it, 410 content_expired once retention ends.
Parameters
idquery · stringrequired
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/generation/content?id=$ID" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_getGenerationContent', {
id: '<id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_getGenerationContent",
"arguments": {
"id": "<id>"
}
}
}Submit idempotent generation feedback
POST/v1/foundry/generation/feedback
Record feedback on one of your own generations (generation_id, category, optional comment up to 1000 characters). Requires an Idempotency-Key (8-128 characters of A-Z a-z 0-9 - _ . :): a retry with the same key and body is answered as a success without recording twice, and the same key with a different body is a 409. Not billed. Foundry admits foundry:gateway:invoke or management (openrouter_generations.rs authenticate_invoke_or_management): a Console login session gets the delegated foundry:gateway:invoke child, and an organization API key needs the foundry:invoke permission.
Parameters
Idempotency-Keyheader · stringrequiredStable key, 8-128 characters of A-Z a-z 0-9 - _ . :; Foundry refuses feedback without one (400). Reuse it to retry.
Request body application/json
generation_idstringrequiredcategory"latency" | "incoherence" | "incorrect_response" | "formatting" | "billing" | "api_error" | "other"requiredcommentstringmax length 1000
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/generation/feedback" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{
"generation_id": "string",
"category": "latency"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('foundry_submitGenerationFeedback', {
body: {
generation_id: 'string',
category: 'latency',
},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_submitGenerationFeedback",
"arguments": {
"body": {
"generation_id": "string",
"category": "latency"
},
"idempotency_key": "<a stable key per change>"
}
}
}Generations
Get a generation receipt
GET/v1/foundry/generations/{receipt_id}
Parameters
receipt_idpath · stringrequired
Responses
- 200Successful response.
Response fields
versionstringreceipt_idstringrequiredrequest_idstringrequiredmodel_idstringprovider_idstringlane"pay_as_you_go" | "subscription_entitled" | "byok"usageobjectusage.prompt_tokensintegermin 0
usage.completion_tokensintegermin 0
usage.total_tokensintegermin 0
usage.costnumbermin 0
signaturestring
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/generations/$RECEIPT_ID" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_getGenerationReceipt', {
receipt_id: '<receipt_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_getGenerationReceipt",
"arguments": {
"receipt_id": "<receipt_id>"
}
}
}Get a generation receipt by request ID
GET/v1/foundry/generations/by-request/{request_id}
Parameters
request_idpath · stringrequired
Responses
- 200Successful response.
Response fields
versionstringreceipt_idstringrequiredrequest_idstringrequiredmodel_idstringprovider_idstringlane"pay_as_you_go" | "subscription_entitled" | "byok"usageobjectusage.prompt_tokensintegermin 0
usage.completion_tokensintegermin 0
usage.total_tokensintegermin 0
usage.costnumbermin 0
signaturestring
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/generations/by-request/$REQUEST_ID" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_getGenerationReceiptByRequest', {
request_id: '<request_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_getGenerationReceiptByRequest",
"arguments": {
"request_id": "<request_id>"
}
}
}Images
Validate an image generation request
POST/v1/foundry/images
Request body application/json
modelstringrequiredpromptstringproviderobjectprovider.orderstring[]provider.onlystring[]provider.ignorestring[]provider.allow_fallbacksbooleanprovider.require_parametersbooleanprovider.zdrbooleanprovider.data_collection"allow" | "deny"provider.sortanyprovider.max_priceobject
Responses
- 501The request is validated, but this modality transport is not executable.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/images" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_createImage', {
body: {
model: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_createImage",
"arguments": {
"body": {
"model": "string"
}
}
}
}List image-capable models
GET/v1/foundry/images/models
Responses
- 200Successful response.
Response fields
dataobject[]required
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/images/models" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listImageModels'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_listImageModels",
"arguments": {}
}
}Infer
Run Foundry universal inference
POST/v1/foundry/infer
Dispatches a model and is billed from Stripe-funded prepaid Foundry credits only: for a Console (pf_console) or One app (pf_one) login the gateway delegates foundry:gateway:invoke:prepaid, and Foundry reserves and settles the call against the organization's prepaid credit ledger, refusing it when the credits do not cover it. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Request body application/json
providerstringrequiredmodelstringrequiredinputobjectrequiredparametersobject
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/infer" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"provider": "string",
"model": "string",
"input": {}
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_createInference', {
body: {
provider: 'string',
model: 'string',
input: {},
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_createInference",
"arguments": {
"body": {
"provider": "string",
"model": "string",
"input": {}
}
}
}
}Stream Foundry universal inference
POST/v1/foundry/infer/stream
Server-sent events. Dispatches a model and is billed from Stripe-funded prepaid Foundry credits only: for a Console (pf_console) or One app (pf_one) login the gateway delegates foundry:gateway:invoke:prepaid, and Foundry reserves and settles the call against the organization's prepaid credit ledger, refusing it when the credits do not cover it. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Request body application/json
providerstringrequiredmodelstringrequiredinputobjectrequiredparametersobject
Responses
- 200Server-sent event stream.
Response fields
Type:
string - 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/infer/stream" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"provider": "string",
"model": "string",
"input": {}
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_streamInference', {
body: {
provider: 'string',
model: 'string',
input: {},
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "foundry_streamInference",
"arguments": {
"body": {
"provider": "string",
"model": "string",
"input": {}
}
}
}
}
}Keys
List tenant API keys
GET/v1/foundry/keys
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/keys" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listApiKeys'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_listApiKeys",
"arguments": {}
}
}Create a tenant API key
POST/v1/foundry/keys
Parameters
Idempotency-Keyheader · stringrequiredStable key; the gateway's native key handler refuses a write without one.
Request body application/json
labelstring | nullrequiredDisplay label (UTF-8, at most 120 bytes, no control characters), or null. max length 120
scopes"foundry:gateway:invoke:prepaid"[]requiredExactly ["foundry:gateway:invoke:prepaid"].
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/keys" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{
"label": "string",
"scopes": [
"foundry:gateway:invoke:prepaid"
]
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('foundry_createApiKey', {
body: {
label: 'string',
scopes: [
'foundry:gateway:invoke:prepaid',
],
},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "foundry_createApiKey",
"arguments": {
"body": {
"label": "string",
"scopes": [
"foundry:gateway:invoke:prepaid"
]
},
"idempotency_key": "<a stable key per change>"
}
}
}
}Delete a tenant API key
DELETE/v1/foundry/keys/{key_id}
Parameters
key_idpath · stringrequiredIdempotency-Keyheader · stringrequiredStable key; the gateway's native key handler refuses a write without one.
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X DELETE "https://os.one.ml/api/v1/foundry/keys/$KEY_ID" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('foundry_deleteApiKey', {
key_id: '<key_id>',
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "foundry_deleteApiKey",
"arguments": {
"key_id": "<key_id>",
"idempotency_key": "<a stable key per change>"
}
}
}
}Rotate
Rotate a tenant API key
POST/v1/foundry/keys/{key_id}/rotate
Replaces the key with a new secret (shown once); the old key stops working. Gateway-native (gateway/src/foundry-key-write.ts), One account login only.
Parameters
key_idpath · stringrequiredIdempotency-Keyheader · stringrequiredStable key; the gateway's native key handler refuses a write without one.
Request body application/json
labelstring | nullrequiredDisplay label (UTF-8, at most 120 bytes, no control characters), or null. max length 120
scopes"foundry:gateway:invoke:prepaid"[]requiredExactly ["foundry:gateway:invoke:prepaid"].
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/keys/$KEY_ID/rotate" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{
"label": "string",
"scopes": [
"foundry:gateway:invoke:prepaid"
]
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('foundry_rotateApiKey', {
key_id: '<key_id>',
body: {
label: 'string',
scopes: [
'foundry:gateway:invoke:prepaid',
],
},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "foundry_rotateApiKey",
"arguments": {
"key_id": "<key_id>",
"body": {
"label": "string",
"scopes": [
"foundry:gateway:invoke:prepaid"
]
},
"idempotency_key": "<a stable key per change>"
}
}
}
}Messages
Create an Anthropic-compatible message
POST/v1/foundry/messages
Anthropic Messages, served by Foundry at /api/v1/messages. Gateway: One account login (delegated foundry:gateway:invoke); organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Request body application/json
modelstringrequiredmessagesobject[]requiredmessages[].[].rolestringrequiredmessages[].[].contentanyrequiredmax_tokensintegerrequiredmin 1
streambooleanproviderobjectprovider.orderstring[]provider.onlystring[]provider.ignorestring[]provider.allow_fallbacksbooleanprovider.require_parametersbooleanprovider.zdrbooleanprovider.data_collection"allow" | "deny"provider.sortanyprovider.max_priceobject
Responses
- 200Successful response.
Response fields
idstringrequiredmodelstringcontentobject[]requiredusageobjectusage.prompt_tokensintegermin 0
usage.completion_tokensintegermin 0
usage.total_tokensintegermin 0
usage.costnumbermin 0
foundryobjectfoundry.request_idstringfoundry.receipt_idstringfoundry.billing_lane"pay_as_you_go" | "subscription_entitled" | "byok"
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/messages" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "string",
"messages": [],
"max_tokens": 1
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_createMessage', {
body: {
model: 'string',
messages: [],
max_tokens: 1,
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_createMessage",
"arguments": {
"body": {
"model": "string",
"messages": [],
"max_tokens": 1
}
}
}
}Models
List executable models
GET/v1/foundry/models
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/models"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listModels'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_listModels",
"arguments": {}
}
}Predict
Predict over tabular rows
POST/v1/foundry/predict
Dispatches a model and is billed from Stripe-funded prepaid Foundry credits only: for a Console (pf_console) or One app (pf_one) login the gateway delegates foundry:gateway:invoke:prepaid, and Foundry reserves and settles the call against the organization's prepaid credit ledger, refusing it when the credits do not cover it. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Request body application/json
modelstringrequiredcolumnsstring[]requiredrowsany[][]required
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/predict" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "string",
"columns": [],
"rows": []
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_predictTabular', {
body: {
model: 'string',
columns: [],
rows: [],
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_predictTabular",
"arguments": {
"body": {
"model": "string",
"columns": [],
"rows": []
}
}
}
}Provider credential policies
List tenant provider credential policies
GET/v1/foundry/provider-credential-policies
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/provider-credential-policies" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listProviderCredentialPolicies'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_listProviderCredentialPolicies",
"arguments": {}
}
}Set a tenant provider credential policy
PUT/v1/foundry/provider-credential-policies/{provider_id}
Parameters
provider_idpath · stringrequired
Request body application/json
mode"platform" | "prefer_byok" | "require_byok"required
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X PUT "https://os.one.ml/api/v1/foundry/provider-credential-policies/$PROVIDER_ID" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mode": "platform"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_setProviderCredentialPolicy', {
provider_id: '<provider_id>',
body: {
mode: 'platform',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_setProviderCredentialPolicy",
"arguments": {
"provider_id": "<provider_id>",
"body": {
"mode": "platform"
}
}
}
}Provider credentials
Summarise your provider credentials and credential policies
GET/v1/foundry/provider-credentials/summary
Console login session or an organization API key holding foundry:read (a one-scope foundry:reporting:read child, Sandbox). Configuration metadata only: provider ids, enabled flags, credential modes and timestamps. No secret material, and no health or execution verification. Takes no query. gateway/src/foundry-reporting-read.ts.
Responses
- 200Provider credential configuration summary
Response fields
dataobjectrequireddata.object"provider_credential_summary"requireddata.sourcestringrequireddata.generated_atstring (date-time)requireddata.completebooleanrequireddata.consistencystringrequireddata.configuration_onlybooleanrequireddata.health_verifiedbooleanrequireddata.execution_verifiedbooleanrequireddata.default_credential_modestringrequireddata.credential_countintegerrequiredmin 0
data.enabled_credential_countintegerrequiredmin 0
data.credentialsobject[]requireddata.credentials[].[].provider_idstringrequireddata.credentials[].[].enabledbooleanCredentials only
data.credentials[].[].created_atstring (date-time)requireddata.credentials[].[].updated_atstring (date-time)requireddata.credentials[].[].credential_mode"platform" | "prefer_byok" | "require_byok"requireddata.policiesobject[]requireddata.policies[].[].provider_idstringrequireddata.policies[].[].enabledbooleanCredentials only
data.policies[].[].created_atstring (date-time)requireddata.policies[].[].updated_atstring (date-time)requireddata.policies[].[].credential_mode"platform" | "prefer_byok" | "require_byok"requiredscopeobjectrequiredscope.organization_idstringrequiredscope.projects"all"requiredscope.environments"all"requiredscope.authority"native_reporting_read"requiredscope.scope"foundry:reporting:read"requiredscope.provenanceobjectrequiredscope.provenance.principal_idstringscope.provenance.platform_id"pf_foundry"scope.provenance.selected_project_idstring | nullscope.provenance.selected_workspace_idstring | nullscope.provenance.selected_environment"sandbox"scope.provenance.role"authorization_only"
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/provider-credentials/summary" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_getProviderCredentialSummary'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_getProviderCredentialSummary",
"arguments": {}
}
}Provider keys
List tenant BYOK provider keys
GET/v1/foundry/provider-keys
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/provider-keys" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listProviderKeys'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_listProviderKeys",
"arguments": {}
}
}Register a tenant BYOK provider key
POST/v1/foundry/provider-keys
Request body application/json
provider_idstringrequiredapi_keystringrequiredlabelstring | null
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/provider-keys" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"provider_id": "string",
"api_key": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_createProviderKey', {
body: {
provider_id: 'string',
api_key: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_createProviderKey",
"arguments": {
"body": {
"provider_id": "string",
"api_key": "string"
}
}
}
}Delete a tenant provider key
DELETE/v1/foundry/provider-keys/{provider_id}
Parameters
provider_idpath · stringrequired
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X DELETE "https://os.one.ml/api/v1/foundry/provider-keys/$PROVIDER_ID" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_deleteProviderKey', {
provider_id: '<provider_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_deleteProviderKey",
"arguments": {
"provider_id": "<provider_id>"
}
}
}Enable or disable a tenant provider key
PATCH/v1/foundry/provider-keys/{provider_id}
Parameters
provider_idpath · stringrequired
Request body application/json
enabledbooleanrequired
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X PATCH "https://os.one.ml/api/v1/foundry/provider-keys/$PROVIDER_ID" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"enabled": true
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_updateProviderKey', {
provider_id: '<provider_id>',
body: {
enabled: true,
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_updateProviderKey",
"arguments": {
"provider_id": "<provider_id>",
"body": {
"enabled": true
}
}
}
}Receipts
List the current and retired receipt verification keys
GET/v1/foundry/receipts/verification-keys
Public. The active receipt-signing key plus every retired key that still verifies receipts signed before a rotation. Public keys only; retired keys verify, they never sign.
Responses
- 200The current key and the retired keys that still verify.
Response fields
currentobjectrequiredPublic verification material for a Foundry receipt-signing key (foundry-core GenerationReceiptVerificationKey).
current.receipt_versionstringrequiredReceipt schema this key verifies, e.g. foundry.generation_receipt.v1.
current.key_idstringrequiredVersioned key identifier copied into receipt signatures, e.g. foundry-receipt-key-2026-10. min length 1 · max length 128
current.algorithmstringrequiredSignature algorithm and digest construction, e.g. ed25519-blake3.
current.public_key_base64urlstringrequiredRaw 32-byte Ed25519 public key, unpadded base64url. pattern
^[A-Za-z0-9_-]{43}$retiredobject[]requiredRetired keys that still verify receipts signed before a rotation. Empty when no rotation has happened.
retired[].[].receipt_versionstringrequiredReceipt schema this key verifies, e.g. foundry.generation_receipt.v1.
retired[].[].key_idstringrequiredVersioned key identifier copied into receipt signatures, e.g. foundry-receipt-key-2026-10. min length 1 · max length 128
retired[].[].algorithmstringrequiredSignature algorithm and digest construction, e.g. ed25519-blake3.
retired[].[].public_key_base64urlstringrequiredRaw 32-byte Ed25519 public key, unpadded base64url. pattern
^[A-Za-z0-9_-]{43}$
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/receipts/verification-keys" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listReceiptVerificationKeys'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_listReceiptVerificationKeys",
"arguments": {}
}
}Get the current receipt verification key
GET/v1/foundry/receipts/verification-keys/current
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/receipts/verification-keys/current"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_getReceiptVerificationKey'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_getReceiptVerificationKey",
"arguments": {}
}
}Recommend
Recommend items
POST/v1/foundry/recommend
Dispatches a model and is billed from Stripe-funded prepaid Foundry credits only: for a Console (pf_console) or One app (pf_one) login the gateway delegates foundry:gateway:invoke:prepaid, and Foundry reserves and settles the call against the organization's prepaid credit ledger, refusing it when the credits do not cover it. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Request body application/json
modelstringrequiredinputanyrequired
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/recommend" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "string",
"input": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_recommendItems', {
body: {
model: 'string',
input: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_recommendItems",
"arguments": {
"body": {
"model": "string",
"input": "string"
}
}
}
}Registry
Compare registry model dossiers
GET/v1/foundry/registry/compare
Pass two or more model parameters (canonical model ids from the registry); fewer answers 400 with code FOUNDRY_UPSTREAM_REFUSED. The 0.1.13 SDK, CLI and MCP don't pass model, so call it over HTTP.
Parameters
modelquery · string[]requiredCanonical model id to compare. Repeat the parameter 2 to 6 times with distinct ids (
?model=a&model=b).
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/registry/compare?model=$MODEL&model=anthropic%2Fclaude-haiku-4.5&model=anthropic%2Fclaude-3-haiku"List registry facets
GET/v1/foundry/registry/facets
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/registry/facets"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listRegistryFacets'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_listRegistryFacets",
"arguments": {}
}
}List registry labs
GET/v1/foundry/registry/labs
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/registry/labs"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listRegistryLabs'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_listRegistryLabs",
"arguments": {}
}
}Get a registry lab dossier
GET/v1/foundry/registry/labs/{lab_id}
Parameters
lab_idpath · stringrequired
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/registry/labs/$LAB_ID"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_getRegistryLab', {
lab_id: '<lab_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_getRegistryLab",
"arguments": {
"lab_id": "<lab_id>"
}
}
}Get current model-base metadata
GET/v1/foundry/registry/model-base/current
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/registry/model-base/current"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_getCurrentModelBase'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_getCurrentModelBase",
"arguments": {}
}
}List model-base releases
GET/v1/foundry/registry/model-base/releases
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/registry/model-base/releases"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listModelBaseReleases'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_listModelBaseReleases",
"arguments": {}
}
}List registry models
GET/v1/foundry/registry/models
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/registry/models"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listRegistryModels'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_listRegistryModels",
"arguments": {}
}
}Get a registry model
GET/v1/foundry/registry/models/{canonical_model_id}
Parameters
canonical_model_idpath · stringrequiredCanonical model id, e.g.
openai/gpt-4o; its/segments are sent as path segments.
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/registry/models/$CANONICAL_MODEL_ID"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_getRegistryModel', {
canonical_model_id: '<canonical_model_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_getRegistryModel",
"arguments": {
"canonical_model_id": "<canonical_model_id>"
}
}
}List benchmark results for a model
GET/v1/foundry/registry/models/{canonical_model_id}/benchmarks
Parameters
canonical_model_idpath · stringrequiredCanonical model id, e.g.
openai/gpt-4o; its/segments are sent as path segments.
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/registry/models/$CANONICAL_MODEL_ID/benchmarks"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listModelBenchmarks', {
canonical_model_id: '<canonical_model_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_listModelBenchmarks",
"arguments": {
"canonical_model_id": "<canonical_model_id>"
}
}
}Get a model dossier
GET/v1/foundry/registry/models/{canonical_model_id}/dossier
Parameters
canonical_model_idpath · stringrequiredCanonical model id, e.g.
openai/gpt-4o; its/segments are sent as path segments.
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/registry/models/$CANONICAL_MODEL_ID/dossier"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_getModelDossier', {
canonical_model_id: '<canonical_model_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_getModelDossier",
"arguments": {
"canonical_model_id": "<canonical_model_id>"
}
}
}List model access offers
GET/v1/foundry/registry/models/{canonical_model_id}/offers
Parameters
canonical_model_idpath · stringrequiredCanonical model id, e.g.
openai/gpt-4o; its/segments are sent as path segments.
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/registry/models/$CANONICAL_MODEL_ID/offers"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listModelOffers', {
canonical_model_id: '<canonical_model_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_listModelOffers",
"arguments": {
"canonical_model_id": "<canonical_model_id>"
}
}
}List the sources behind a model record
GET/v1/foundry/registry/models/{canonical_model_id}/sources
Parameters
canonical_model_idpath · stringrequiredCanonical model id, e.g.
openai/gpt-4o; its/segments are sent as path segments.
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/registry/models/$CANONICAL_MODEL_ID/sources"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listModelSources', {
canonical_model_id: '<canonical_model_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_listModelSources",
"arguments": {
"canonical_model_id": "<canonical_model_id>"
}
}
}List registry provenance
GET/v1/foundry/registry/provenance
Foundry answers 413 ("source catalog requires V2 pagination") for every request; use listRegistryProvenanceV2 (paginated).
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/registry/provenance"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listRegistryProvenance'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "foundry_listRegistryProvenance",
"arguments": {}
}
}
}List registry providers
GET/v1/foundry/registry/providers
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/registry/providers"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listRegistryProviders'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_listRegistryProviders",
"arguments": {}
}
}Get a registry provider
GET/v1/foundry/registry/providers/{provider_id}
Parameters
provider_idpath · stringrequired
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/registry/providers/$PROVIDER_ID"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_getRegistryProvider', {
provider_id: '<provider_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_getRegistryProvider",
"arguments": {
"provider_id": "<provider_id>"
}
}
}Get a provider dossier
GET/v1/foundry/registry/providers/{provider_id}/dossier
Parameters
provider_idpath · stringrequired
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/registry/providers/$PROVIDER_ID/dossier"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_getProviderDossier', {
provider_id: '<provider_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_getProviderDossier",
"arguments": {
"provider_id": "<provider_id>"
}
}
}List registry sources
GET/v1/foundry/registry/sources
Foundry answers 413 ("source catalog requires V2 pagination") for every request; use listRegistrySourcesV2 (paginated).
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/registry/sources"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listRegistrySources'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "foundry_listRegistrySources",
"arguments": {}
}
}
}Request logs
Read your organization's inference request logs
GET/v1/foundry/request-logs
Console login session or an organization API key holding foundry:read (a one-scope foundry:reporting:read child, Sandbox). Read-only, newest first; the gateway rejects any query parameter other than the ones below and returns only the listed fields. gateway/src/foundry-reporting-read.ts.
Parameters
startquery · string (date-time)RFC 3339 start, must be before end
endquery · string (date-time)RFC 3339 end
modelquery · stringproviderquery · stringlimitquery · integeroffsetquery · integer
Responses
- 200One page of request logs
Response fields
dataobject[]requireddata[].[].idstringrequireddata[].[].timestampstring (date-time)requireddata[].[].modelstringrequireddata[].[].providerstringrequireddata[].[].statusintegerrequiredmin 100 · max 599
data[].[].prompt_tokensintegerrequiredmin 0
data[].[].completion_tokensintegerrequiredmin 0
data[].[].total_tokensintegerrequiredmin 0
data[].[].latency_msintegerrequiredmin 0
data[].[].estimated_cost_microdollarsintegerrequiredmin 0
scopeobjectrequiredscope.organization_idstringrequiredscope.projects"all"requiredscope.environments"all"requiredscope.authority"native_reporting_read"requiredscope.scope"foundry:reporting:read"requiredscope.provenanceobjectrequiredscope.provenance.principal_idstringscope.provenance.platform_id"pf_foundry"scope.provenance.selected_project_idstring | nullscope.provenance.selected_workspace_idstring | nullscope.provenance.selected_environment"sandbox"scope.provenance.role"authorization_only"metaobjectrequiredmeta.limitintegerrequiredmin 0
meta.offsetintegerrequiredmin 0
meta.total_countintegerrequiredmin 0
meta.has_morebooleanrequired
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/request-logs" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listRequestLogs'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_listRequestLogs",
"arguments": {}
}
}Rerank
Validate a rerank request
POST/v1/foundry/rerank
Request body application/json
modelstringrequiredquerystringrequireddocumentsany[]requiredtop_nintegermin 1
providerobjectprovider.orderstring[]provider.onlystring[]provider.ignorestring[]provider.allow_fallbacksbooleanprovider.require_parametersbooleanprovider.zdrbooleanprovider.data_collection"allow" | "deny"provider.sortanyprovider.max_priceobject
Responses
- 501The request is validated, but this modality transport is not executable.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/rerank" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "string",
"query": "string",
"documents": [
"string"
]
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_createRerank', {
body: {
model: 'string',
query: 'string',
documents: [
'string',
],
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_createRerank",
"arguments": {
"body": {
"model": "string",
"query": "string",
"documents": [
"string"
]
}
}
}
}Responses
Create an OpenAI Responses response
POST/v1/foundry/responses
Request body application/json
modelstringrequiredinputanyrequiredstreambooleanproviderobjectprovider.orderstring[]provider.onlystring[]provider.ignorestring[]provider.allow_fallbacksbooleanprovider.require_parametersbooleanprovider.zdrbooleanprovider.data_collection"allow" | "deny"provider.sortanyprovider.max_priceobject
Responses
- 200Successful response.
Response fields
idstringrequiredobjectstringmodelstringoutputobject[]usageobjectusage.prompt_tokensintegermin 0
usage.completion_tokensintegermin 0
usage.total_tokensintegermin 0
usage.costnumbermin 0
foundryobjectfoundry.request_idstringfoundry.receipt_idstringfoundry.billing_lane"pay_as_you_go" | "subscription_entitled" | "byok"
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/responses" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "string",
"input": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_createResponse', {
body: {
model: 'string',
input: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_createResponse",
"arguments": {
"body": {
"model": "string",
"input": "string"
}
}
}
}Routing
Build an eval run from per-item outcomes
POST/v1/foundry/routing/evals/aggregate
Computes only (no provider dispatch); not billed. Works with a Console login session (pf_console), for which the gateway delegates foundry:gateway:invoke. One app sign-ins (pf_one) are refused by Foundry: their prepaid child covers only billed inference. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Request body application/json
A JSON object; see the description above.
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/routing/evals/aggregate" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_aggregateRoutingEval', {
body: {},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_aggregateRoutingEval",
"arguments": {
"body": {}
}
}
}Check whether an eval run supports a public claim
POST/v1/foundry/routing/evals/claim-readiness
Computes only (no provider dispatch); not billed. Works with a Console login session (pf_console), for which the gateway delegates foundry:gateway:invoke. One app sign-ins (pf_one) are refused by Foundry: their prepaid child covers only billed inference. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Request body application/json
A JSON object; see the description above.
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/routing/evals/claim-readiness" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_checkRoutingEvalClaimReadiness', {
body: {},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_checkRoutingEvalClaimReadiness",
"arguments": {
"body": {}
}
}
}Build a dry-run routing eval plan
POST/v1/foundry/routing/evals/plan
Computes only (no provider dispatch); not billed. Works with a Console login session (pf_console), for which the gateway delegates foundry:gateway:invoke. One app sign-ins (pf_one) are refused by Foundry: their prepaid child covers only billed inference. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Request body application/json
A JSON object; see the description above.
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/routing/evals/plan" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_planRoutingEval', {
body: {},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_planRoutingEval",
"arguments": {
"body": {}
}
}
}Aggregate outcomes for a planned suite
POST/v1/foundry/routing/evals/plan/aggregate
Computes only (no provider dispatch); not billed. Works with a Console login session (pf_console), for which the gateway delegates foundry:gateway:invoke. One app sign-ins (pf_one) are refused by Foundry: their prepaid child covers only billed inference. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Request body application/json
A JSON object; see the description above.
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/routing/evals/plan/aggregate" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_aggregatePlannedRoutingEval', {
body: {},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_aggregatePlannedRoutingEval",
"arguments": {
"body": {}
}
}
}Build a plan and runner-ready jobs (no provider execution)
POST/v1/foundry/routing/evals/plan/dispatch
Computes only (no provider dispatch); not billed. Works with a Console login session (pf_console), for which the gateway delegates foundry:gateway:invoke. One app sign-ins (pf_one) are refused by Foundry: their prepaid child covers only billed inference. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Request body application/json
A JSON object; see the description above.
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/routing/evals/plan/dispatch" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_dispatchRoutingEvalPlan', {
body: {},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_dispatchRoutingEvalPlan",
"arguments": {
"body": {}
}
}
}Aggregate runner reports for a dispatched plan
POST/v1/foundry/routing/evals/plan/dispatch/aggregate
Computes only (no provider dispatch); not billed. Works with a Console login session (pf_console), for which the gateway delegates foundry:gateway:invoke. One app sign-ins (pf_one) are refused by Foundry: their prepaid child covers only billed inference. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Request body application/json
A JSON object; see the description above.
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/routing/evals/plan/dispatch/aggregate" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_aggregateRoutingEvalDispatch', {
body: {},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_aggregateRoutingEvalDispatch",
"arguments": {
"body": {}
}
}
}Explain a persisted routing invocation
GET/v1/foundry/routing/invocations/{id}/explain
Computes only (no provider dispatch); not billed. Works with a Console login session (pf_console), for which the gateway delegates foundry:gateway:invoke. One app sign-ins (pf_one) are refused by Foundry: their prepaid child covers only billed inference. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Parameters
idpath · stringrequired
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/routing/invocations/$ID/explain" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_explainRoutingInvocation', {
id: '<id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_explainRoutingInvocation",
"arguments": {
"id": "<id>"
}
}
}Preview routing without provider execution
POST/v1/foundry/routing/preview
Computes only (no provider dispatch); not billed. Works with a Console login session (pf_console), for which the gateway delegates foundry:gateway:invoke. One app sign-ins (pf_one) are refused by Foundry: their prepaid child covers only billed inference. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Request body application/json
modelstringrequiredmodalitystringproviderobjectprovider.orderstring[]provider.onlystring[]provider.ignorestring[]provider.allow_fallbacksbooleanprovider.require_parametersbooleanprovider.zdrbooleanprovider.data_collection"allow" | "deny"provider.sortanyprovider.max_priceobject
Responses
- 200Successful response.
Response fields
candidatesobject[]selectedobjectexecutablebooleanbilling_lanestring
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/routing/preview" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_previewRoute', {
body: {
model: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_previewRoute",
"arguments": {
"body": {
"model": "string"
}
}
}
}Segment
Segment an image
POST/v1/foundry/segment
Dispatches a model and is billed from Stripe-funded prepaid Foundry credits only: for a Console (pf_console) or One app (pf_one) login the gateway delegates foundry:gateway:invoke:prepaid, and Foundry reserves and settles the call against the organization's prepaid credit ledger, refusing it when the credits do not cover it. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Request body application/json
modelstringrequiredimageobject | objectrequired{"url": ...}or{"data": base64, "media_type": ...}(convenience.rs ImageInput)
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/segment" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "string",
"image": {
"url": "string"
}
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_segmentImage', {
body: {
model: 'string',
image: {
url: 'string',
},
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_segmentImage",
"arguments": {
"body": {
"model": "string",
"image": {
"url": "string"
}
}
}
}
}Speak
Synthesize speech from text
POST/v1/foundry/speak
Dispatches a model and is billed from Stripe-funded prepaid Foundry credits only: for a Console (pf_console) or One app (pf_one) login the gateway delegates foundry:gateway:invoke:prepaid, and Foundry reserves and settles the call against the organization's prepaid credit ledger, refusing it when the credits do not cover it. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Request body application/json
modelstringrequiredtextstringrequiredvoicestring
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/speak" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "string",
"text": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_synthesizeSpeech', {
body: {
model: 'string',
text: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_synthesizeSpeech",
"arguments": {
"body": {
"model": "string",
"text": "string"
}
}
}
}Realtime speech socket (Eleven v4 Turbo)
GET/v1/foundry/speak/stream
Send {"text","flush"?} messages, {"type":"close"} to end; receive audio frames, a receipt and done. Open it as an HTTP/1.1 WebSocket upgrade; a plain GET gets 426 UPGRADE_REQUIRED. The gateway relays the session unchanged once Foundry accepts it. Billed from Stripe-funded prepaid Foundry credits only: for a Console (pf_console) or One app (pf_one) login the gateway delegates foundry:gateway:invoke:prepaid, and Foundry reserves and settles the session against the organization's prepaid credit ledger, refusing it when the credits do not cover it. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Parameters
voice_idquery · stringrequiredAn allowed voice.
model_idquery · "eleven_v4_turbo" | "eleven_v4"eleven_v4_turbo (default when priced) or eleven_v4.
output_formatquery · "mp3_44100_128" | "pcm_16000" | "pcm_24000" | "ulaw_8000"Audio format.
Responses
- 101Switching Protocols: the WebSocket session.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/speak/stream?voice_id=$VOICE_ID" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_openSpeechSocket', {
voice_id: '<voice_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "foundry_openSpeechSocket",
"arguments": {
"voice_id": "<voice_id>"
}
}
}
}Stream speech as it is synthesized (Eleven v4 Turbo)
POST/v1/foundry/speak/stream
Audio bytes as they are synthesized, first audio in about a quarter second upstream. Answers x-foundry-receipt-id, x-foundry-characters (characters billed) and x-speech-request-id (name it in a later passage's previous_request_ids to stitch). Billed from Stripe-funded prepaid Foundry credits only: for a Console (pf_console) or One app (pf_one) login the gateway delegates foundry:gateway:invoke:prepaid, and Foundry reserves and settles the session against the organization's prepaid credit ledger, refusing it when the credits do not cover it. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Request body application/json
textstringrequiredThe passage to speak. Eleven v4 audio tags such as [laughs] or [whispers] are performed, not read.
voice_idstringrequiredOne of Foundry's allowed voices (One's voice and the One app's alternates).
model_id"eleven_v4_turbo" | "eleven_v4"Default eleven_v4_turbo when Foundry prices it, else eleven_v4.
output_format"mp3_44100_128" | "pcm_16000" | "pcm_24000" | "ulaw_8000"previous_textstringnext_textstringprevious_request_idsstring[]x-speech-request-id values of your own recent passages (15 minutes), so this one continues them without a seam; others are ignored.
next_request_idsstring[]
Responses
- 200Audio stream.
Response fields
Type:
string (binary) - 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/speak/stream" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "string",
"voice_id": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_streamSpeech', {
body: {
text: 'string',
voice_id: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "foundry_streamSpeech",
"arguments": {
"body": {
"text": "string",
"voice_id": "string"
}
}
}
}
}Summarize
Summarize text
POST/v1/foundry/summarize
Dispatches a model and is billed from Stripe-funded prepaid Foundry credits only: for a Console (pf_console) or One app (pf_one) login the gateway delegates foundry:gateway:invoke:prepaid, and Foundry reserves and settles the call against the organization's prepaid credit ledger, refusing it when the credits do not cover it. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Request body application/json
modelstringrequiredtextstringrequiredmax_tokensintegermin 1
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/summarize" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "string",
"text": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_summarizeText', {
body: {
model: 'string',
text: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_summarizeText",
"arguments": {
"body": {
"model": "string",
"text": "string"
}
}
}
}Tools
Benchmark models (estimates)
POST/v1/foundry/tools/benchmark
Computes only (no provider dispatch); not billed. Works with a Console login session (pf_console), for which the gateway delegates foundry:gateway:invoke. One app sign-ins (pf_one) are refused by Foundry: their prepaid child covers only billed inference. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Request body application/json
modelsstring[]requiredrunsintegermin 1
promptstringmax_tokensintegermin 1
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/tools/benchmark" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"models": [
"string"
]
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_benchmarkModels', {
body: {
models: [
'string',
],
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_benchmarkModels",
"arguments": {
"body": {
"models": [
"string"
]
}
}
}
}Compare models for a prompt (estimates)
POST/v1/foundry/tools/compare
Computes only (no provider dispatch); not billed. Works with a Console login session (pf_console), for which the gateway delegates foundry:gateway:invoke. One app sign-ins (pf_one) are refused by Foundry: their prepaid child covers only billed inference. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Request body application/json
modelsstring[]requiredpromptstringrequiredsystemstringmax_tokensintegermin 1
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/tools/compare" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"models": [
"string"
],
"prompt": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_compareModels', {
body: {
models: [
'string',
],
prompt: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_compareModels",
"arguments": {
"body": {
"models": [
"string"
],
"prompt": "string"
}
}
}
}Estimate the cost of a call
POST/v1/foundry/tools/cost-estimate
Computes only (no provider dispatch); not billed. Works with a Console login session (pf_console), for which the gateway delegates foundry:gateway:invoke. One app sign-ins (pf_one) are refused by Foundry: their prepaid child covers only billed inference. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Request body application/json
modelstringrequiredprompt_tokensintegerrequiredmin 0
completion_tokensintegerrequiredmin 0
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/tools/cost-estimate" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "string",
"prompt_tokens": 0,
"completion_tokens": 0
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_estimateCost', {
body: {
model: 'string',
prompt_tokens: 0,
completion_tokens: 0,
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_estimateCost",
"arguments": {
"body": {
"model": "string",
"prompt_tokens": 0,
"completion_tokens": 0
}
}
}
}Transcribe
Transcribe audio
POST/v1/foundry/transcribe
Dispatches a model and is billed from Stripe-funded prepaid Foundry credits only: for a Console (pf_console) or One app (pf_one) login the gateway delegates foundry:gateway:invoke:prepaid, and Foundry reserves and settles the call against the organization's prepaid credit ledger, refusing it when the credits do not cover it. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Request body application/json
modelstringrequiredaudiostringrequiredBase64 audio
media_typestringrequiredlanguagestring
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/transcribe" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "string",
"audio": "string",
"media_type": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_transcribeAudio', {
body: {
model: 'string',
audio: 'string',
media_type: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_transcribeAudio",
"arguments": {
"body": {
"model": "string",
"audio": "string",
"media_type": "string"
}
}
}
}Realtime transcription socket (Deepgram Nova-3)
GET/v1/foundry/transcribe/stream
Send audio frames; receive interim and final transcripts and a receipt. Billed per audio second. Open it as an HTTP/1.1 WebSocket upgrade; a plain GET gets 426 UPGRADE_REQUIRED. The gateway relays the session unchanged once Foundry accepts it. Billed from Stripe-funded prepaid Foundry credits only: for a Console (pf_console) or One app (pf_one) login the gateway delegates foundry:gateway:invoke:prepaid, and Foundry reserves and settles the session against the organization's prepaid credit ledger, refusing it when the credits do not cover it. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Parameters
encodingquery · "linear16" | "mulaw"Audio encoding.
sample_ratequery · integerHz.
languagequery · stringBCP-47, default en.
Responses
- 101Switching Protocols: the WebSocket session.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/transcribe/stream" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_openTranscriptionSocket'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "foundry_openTranscriptionSocket",
"arguments": {}
}
}
}V2
List snapshot-stable Registry V2 benchmark evidence
GET/v1/foundry/v2/registry/benchmarks
Parameters
limitquery · integercursorquery · string
Responses
- 200Successful response.
Response fields
version2requiredsnapshotobjectrequireddataobject[]requireddata[].[].idstringrequireddata[].[].canonical_model_idstringrequireddata[].[].benchmarkstringrequireddata[].[].taskstring | nulldata[].[].scorenumber | nulldata[].[].unitstring | nulldata[].[].rankinteger | nulldata[].[].source_idstring | nulldata[].[].observed_atstringrequiredcountintegerrequiredmin 0
pageobjectrequiredpage.countintegerrequiredmin 0
page.totalintegerrequiredmin 0
page.limitintegerrequiredmin 1
page.next_cursorstring | nullpage.has_morebooleanrequired
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/v2/registry/benchmarks" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listRegistryBenchmarksV2'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_listRegistryBenchmarksV2",
"arguments": {}
}
}Compare V2 registry model dossiers
GET/v1/foundry/v2/registry/compare
Parameters
modelquery · string[]requiredCanonical model id to compare. Repeat the parameter 2 to 6 times with distinct ids (
?model=a&model=b).
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/v2/registry/compare?model=$MODEL" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_compareRegistryModelsV2', {
model: '<model>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_compareRegistryModelsV2",
"arguments": {
"model": "<model>"
}
}
}List V2 registry facets
GET/v1/foundry/v2/registry/facets
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/v2/registry/facets" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listRegistryFacetsV2'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_listRegistryFacetsV2",
"arguments": {}
}
}List V2 registry labs
GET/v1/foundry/v2/registry/labs
Parameters
limitquery · integercursorquery · stringCursor from the previous page.
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/v2/registry/labs" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listRegistryLabsV2'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_listRegistryLabsV2",
"arguments": {}
}
}Get a V2 registry lab dossier
GET/v1/foundry/v2/registry/labs/{lab_id}
Parameters
lab_idpath · stringrequired
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/v2/registry/labs/$LAB_ID" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_getRegistryLabV2', {
lab_id: '<lab_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_getRegistryLabV2",
"arguments": {
"lab_id": "<lab_id>"
}
}
}Get current V2 model-base metadata
GET/v1/foundry/v2/registry/model-base/current
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/v2/registry/model-base/current" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_getCurrentModelBaseV2'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_getCurrentModelBaseV2",
"arguments": {}
}
}List V2 model-base releases
GET/v1/foundry/v2/registry/model-base/releases
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/v2/registry/model-base/releases" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listModelBaseReleasesV2'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_listModelBaseReleasesV2",
"arguments": {}
}
}Get an unambiguous V2 model dossier
GET/v1/foundry/v2/registry/model-dossiers/{canonical_model_id}
Parameters
canonical_model_idpath · stringrequiredCanonical model id, e.g.
openai/gpt-4o; its/segments are sent as path segments.
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/v2/registry/model-dossiers/$CANONICAL_MODEL_ID" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_getModelDossierV2', {
canonical_model_id: '<canonical_model_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_getModelDossierV2",
"arguments": {
"canonical_model_id": "<canonical_model_id>"
}
}
}List Registry Intelligence V2 models
GET/v1/foundry/v2/registry/models
Parameters
limitquery · integercursorquery · stringCursor from the previous page.
offsetquery · integersearchquery · stringsortquery · stringdirectionquery · stringorgquery · stringlabquery · stringproviderquery · stringtaskquery · stringcapabilityquery · stringmodalityquery · stringmodel_typequery · stringaccess_modequery · stringbilling_lanequery · stringdeployment_scopequery · stringrouteabilityquery · stringmodel_base_versionquery · stringprojectionquery · stringfieldsquery · string
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/v2/registry/models" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listRegistryModelsV2'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_listRegistryModelsV2",
"arguments": {}
}
}Get a Registry Intelligence V2 model dossier
GET/v1/foundry/v2/registry/models/{canonical_model_id}
Parameters
canonical_model_idpath · stringrequiredCanonical model id, e.g.
openai/gpt-4o; its/segments are sent as path segments.
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/v2/registry/models/$CANONICAL_MODEL_ID" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_getRegistryModelV2', {
canonical_model_id: '<canonical_model_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_getRegistryModelV2",
"arguments": {
"canonical_model_id": "<canonical_model_id>"
}
}
}List V2 registry provenance
GET/v1/foundry/v2/registry/provenance
Parameters
limitquery · integercursorquery · stringCursor from the previous page.
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/v2/registry/provenance" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listRegistryProvenanceV2'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_listRegistryProvenanceV2",
"arguments": {}
}
}List Registry Intelligence V2 providers
GET/v1/foundry/v2/registry/providers
Parameters
limitquery · integercursorquery · stringCursor from the previous page.
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/v2/registry/providers" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listRegistryProvidersV2'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_listRegistryProvidersV2",
"arguments": {}
}
}Get a V2 provider dossier
GET/v1/foundry/v2/registry/providers/{provider_id}
Parameters
provider_idpath · stringrequired
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/v2/registry/providers/$PROVIDER_ID" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_getProviderDossierV2', {
provider_id: '<provider_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_getProviderDossierV2",
"arguments": {
"provider_id": "<provider_id>"
}
}
}List V2 registry sources
GET/v1/foundry/v2/registry/sources
Parameters
limitquery · integercursorquery · stringCursor from the previous page.
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/v2/registry/sources" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_listRegistrySourcesV2'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_listRegistrySourcesV2",
"arguments": {}
}
}Videos
Validate a video generation request
POST/v1/foundry/videos
Request body application/json
modelstringrequiredpromptstringproviderobjectprovider.orderstring[]provider.onlystring[]provider.ignorestring[]provider.allow_fallbacksbooleanprovider.require_parametersbooleanprovider.zdrbooleanprovider.data_collection"allow" | "deny"provider.sortanyprovider.max_priceobject
Responses
- 501The request is validated, but this modality transport is not executable.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/videos" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_createVideo', {
body: {
model: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "foundry_createVideo",
"arguments": {
"body": {
"model": "string"
}
}
}
}
}Validate a video job lookup
GET/v1/foundry/videos/{id}
Parameters
idpath · stringrequired
Responses
- 501The request is validated, but this modality transport is not executable.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/videos/$ID" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_getVideo', {
id: '<id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "foundry_getVideo",
"arguments": {
"id": "<id>"
}
}
}
}Content
Validate a video content lookup
GET/v1/foundry/videos/{id}/content
Parameters
idpath · stringrequired
Responses
- 501The request is validated, but this modality transport is not executable.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/videos/$ID/content" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_getVideoContent', {
id: '<id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "foundry_getVideoContent",
"arguments": {
"id": "<id>"
}
}
}
}Status
Get a workload's status
GET/v1/foundry/workloads/{workload_id}/status
Not billed. Works with a Console login session (pf_console), for which the gateway delegates foundry:gateway:invoke. One app sign-ins (pf_one) are refused by Foundry: their prepaid child covers only billed inference. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Parameters
workload_idpath · stringrequired
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/foundry/workloads/$WORKLOAD_ID/status" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_getWorkloadStatus', {
workload_id: '<workload_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_getWorkloadStatus",
"arguments": {
"workload_id": "<workload_id>"
}
}
}Terminate
Terminate a workload
POST/v1/foundry/workloads/{workload_id}/terminate
Not billed. Works with a Console login session (pf_console), for which the gateway delegates foundry:gateway:invoke. One app sign-ins (pf_one) are refused by Foundry: their prepaid child covers only billed inference. Organization API keys get 403 FOUNDRY_HUMAN_SESSION_REQUIRED.
Parameters
workload_idpath · stringrequired
Responses
- 200Successful response.
Response fields
A JSON object.
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/foundry/workloads/$WORKLOAD_ID/terminate" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('foundry_terminateWorkload', {
workload_id: '<workload_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "foundry_terminateWorkload",
"arguments": {
"workload_id": "<workload_id>"
}
}
}L1fe AI Inc. · Built from Genesis 0.3.3 and the live gateway on 2026-10-25. Support