The /api/gen twin, mounted at the host root: identical handlers, prices, credential and wallet — both groups debit the central wallet and log runs centrally. This is the channel CRM & Studio's own AI features use; integrations normally call /api/gen. The credential is an identity-token of the central store — copy your project's from Settings › Plan › Credits in CRM & Studio. The store header and a store access-token are not used here: the store is always incore, and a store token alone is refused with 401.
Read back generative runs of the calling customer (logged under the central incore store). Each entry carries function, model, status (processing | done | error), duration, tags, metadata, args, callback + callback_status (delivered | failed) / callback_error when a webhook was given, and generative.input / generative.output when the run asked for log. Only for owners.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | optional | When ID is set, all other parameters (except mask) is ignored. Returns requested document by ID. |
query | object | optional | Set of conditions to filter out documents. Typically filtering only status: processing | error | done. |
offset | string | optional | ID of last document. |
limit | integer | optional | Maximum number of documents per page. |
order_by | object | optional | Field name and direction - [asc, desc]. |
mask | list | optional | Masks fields in response. Returns just subset of stored object. |
Sample request
{
"query": {
"status": "done"
},
"limit": 20
}10 credits (charged against the central incore ledger)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
inputLocale | string | required | Locale (typically iso 639-1 code) - translate FROM. |
outputLocale | string | required | Locale (typically iso 639-1 code) - translate TO. |
model | string | optional | thinking/flash - default value is flash Default: flash |
callback | string | optional | Webhook URL (required when mode: async) - an absolute http(s) URL, else 400. The run's result is POSTed there ({valid, id, value, metadata}, signed with access-seed) after it finishes; delivery is best-effort with a 10 s timeout and never fails the request - the outcome is recorded on the log entry as callback_status (delivered | failed) + callback_error. |
mode | string | optional | Response mode - sync | async. sync (the default, use it) - returns the processed data. async - DEPRECATED: the run is NOT detached - the function still completes the whole model call, posts the result to callback and only then answers {id}, so the request holds its slot exactly as sync does (plans/api-route-hygiene.md D5). Kept for compatibility; a queued form may replace it later. Default: sync |
metadata | any | optional | Set of developer specified data. |
tags | string[] | optional | Developer-supplied tags stored on the log entry (filterable in the usage log). |
log | string | optional | What the run keeps on its log entry for inspection via gen/log - none | input | output | both. none - only the run's metadata (function, model, status, duration, tags). input - also the request payload. output - also the produced value. both - both. Default: none |
value | object | required | data to translate - should be an Object/Map/Dictionary {[key]: value} |
Sample request
{
"inputLocale": "en",
"outputLocale": "de",
"value": {
"welcome": "Welcome to our store",
"checkout": "Proceed to checkout",
"items": {
"one": "item",
"other": "items"
}
}
}Translates every string in value and returns the same structure. Add model: thinking for higher quality, or mode: async with a callback URL for large payloads.
25 credits (charged against the central incore ledger)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
servings | integer | required | Number of servings. |
ingredients | array | required | List of ingredients: {"ingredient": string, "unit": "string", "quantity": any} |
model | string | optional | thinking/flash - default value is flash Default: flash |
callback | string | optional | Webhook URL (required when mode: async) - an absolute http(s) URL, else 400. The run's result is POSTed there ({valid, id, value, metadata}, signed with access-seed) after it finishes; delivery is best-effort with a 10 s timeout and never fails the request - the outcome is recorded on the log entry as callback_status (delivered | failed) + callback_error. |
mode | string | optional | Response mode - sync | async. sync (the default, use it) - returns the processed data. async - DEPRECATED: the run is NOT detached - the function still completes the whole model call, posts the result to callback and only then answers {id}, so the request holds its slot exactly as sync does (plans/api-route-hygiene.md D5). Kept for compatibility; a queued form may replace it later. Default: sync |
metadata | any | optional | Set of developer specified data. |
tags | string[] | optional | Developer-supplied tags stored on the log entry (filterable in the usage log). |
log | string | optional | What the run keeps on its log entry for inspection via gen/log - none | input | output | both. none - only the run's metadata (function, model, status, duration, tags). input - also the request payload. output - also the produced value. both - both. Default: none |
Sample request
{
"servings": 2,
"ingredients": [
{
"ingredient": "Chicken breast",
"unit": "g",
"quantity": 400
},
{
"ingredient": "Basmati rice",
"unit": "g",
"quantity": 200
},
{
"ingredient": "Olive oil",
"unit": "tbsp",
"quantity": 1
},
{
"ingredient": "Salt",
"unit": null,
"quantity": "pinch"
}
]
}15 credits (charged against the central incore ledger)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
data | object | required | Realty data. |
model | string | optional | thinking/flash - default value is flash Default: flash |
callback | string | optional | Webhook URL (required when mode: async) - an absolute http(s) URL, else 400. The run's result is POSTed there ({valid, id, value, metadata}, signed with access-seed) after it finishes; delivery is best-effort with a 10 s timeout and never fails the request - the outcome is recorded on the log entry as callback_status (delivered | failed) + callback_error. |
mode | string | optional | Response mode - sync | async. sync (the default, use it) - returns the processed data. async - DEPRECATED: the run is NOT detached - the function still completes the whole model call, posts the result to callback and only then answers {id}, so the request holds its slot exactly as sync does (plans/api-route-hygiene.md D5). Kept for compatibility; a queued form may replace it later. Default: sync |
metadata | any | optional | Set of developer specified data. |
tags | string[] | optional | Developer-supplied tags stored on the log entry (filterable in the usage log). |
log | string | optional | What the run keeps on its log entry for inspection via gen/log - none | input | output | both. none - only the run's metadata (function, model, status, duration, tags). input - also the request payload. output - also the produced value. both - both. Default: none |
Sample request
{
"data": "**Address** 12 Baker Street, London NW1\n**Property** Apartment\n**Area** 85 m2\n**Layout** 2 bedrooms\n**About** Fifth floor, fully renovated in 2023, high ceilings, air conditioning, hardwood floors.\n**Ownership** Freehold\n**Elevator** Yes\n**Parking** Private garage space"
}3 credits (charged against the central incore ledger)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
data | object | required | Document content as JSON (e.g. {"title": "...", "perex": "..."}). The model auto-detects the language from these values. |
mask | list | optional | Subset of fields to generate. Any of: 'title', 'description', 'slug', 'meta'. Omit or pass an empty array to generate all four. Response keys mirror the mask. meta = the custom meta tags as a [{key, value}] list (the SeoEntity.meta shape): og:type (website | article | product | profile), og:title + og:description (social share copy, no site-name suffix) and twitter:card. |
model | string | optional | thinking/flash/claude/gpt - default value is flash Default: flash |
callback | string | optional | Webhook URL (required when mode: async) - an absolute http(s) URL, else 400. The run's result is POSTed there ({valid, id, value, metadata}, signed with access-seed) after it finishes; delivery is best-effort with a 10 s timeout and never fails the request - the outcome is recorded on the log entry as callback_status (delivered | failed) + callback_error. |
mode | string | optional | Response mode - sync | async. sync (the default, use it) - returns the processed data. async - DEPRECATED: the run is NOT detached - the function still completes the whole model call, posts the result to callback and only then answers {id}, so the request holds its slot exactly as sync does (plans/api-route-hygiene.md D5). Kept for compatibility; a queued form may replace it later. Default: sync |
metadata | any | optional | Set of developer specified data. |
tags | string[] | optional | Developer-supplied tags stored on the log entry (filterable in the usage log). |
log | string | optional | What the run keeps on its log entry for inspection via gen/log - none | input | output | both. none - only the run's metadata (function, model, status, duration, tags). input - also the request payload. output - also the produced value. both - both. Default: none |
Sample request
{
"data": {
"title": "Organic Cotton Socks",
"perex": "Soft everyday socks made from organic cotton, in six colours."
}
}Returns title, description, slug and meta (og:type, og:title, og:description, twitter:card) in the language of the input. Pass mask (e.g. ["slug"]) to generate only some of them.
5 credits (charged against the central incore ledger)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
data | object | required | Document content as JSON (e.g. {"title": "...", "ingredients": [...]}). The model auto-detects the language from these values and only uses facts present in the data. |
types | list | optional | schema.org @type names to generate (e.g. ['Recipe', 'FAQPage']). One record is produced per type. Omit to let the model auto-detect the appropriate type(s) from the data. |
model | string | optional | thinking/flash/claude/gpt - default value is flash Default: flash |
callback | string | optional | Webhook URL (required when mode: async) - an absolute http(s) URL, else 400. The run's result is POSTed there ({valid, id, value, metadata}, signed with access-seed) after it finishes; delivery is best-effort with a 10 s timeout and never fails the request - the outcome is recorded on the log entry as callback_status (delivered | failed) + callback_error. |
mode | string | optional | Response mode - sync | async. sync (the default, use it) - returns the processed data. async - DEPRECATED: the run is NOT detached - the function still completes the whole model call, posts the result to callback and only then answers {id}, so the request holds its slot exactly as sync does (plans/api-route-hygiene.md D5). Kept for compatibility; a queued form may replace it later. Default: sync |
metadata | any | optional | Set of developer specified data. |
tags | string[] | optional | Developer-supplied tags stored on the log entry (filterable in the usage log). |
log | string | optional | What the run keeps on its log entry for inspection via gen/log - none | input | output | both. none - only the run's metadata (function, model, status, duration, tags). input - also the request payload. output - also the produced value. both - both. Default: none |
Sample request
{
"data": {
"title": "Tomato Soup",
"ingredients": [
"ripe tomatoes",
"onion",
"cream"
],
"steps": [
"Saute the onion.",
"Add the tomatoes and simmer for 20 minutes."
]
},
"types": [
"Recipe"
]
}