inmake DOCS
Docs / API / Generative

Generative

The /api/gen twin — same wallet, same credential.

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.

POST/generative/log

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

NameTypeRequiredDescription
idstringoptionalWhen ID is set, all other parameters (except mask) is ignored. Returns requested document by ID.
queryobjectoptionalSet of conditions to filter out documents. Typically filtering only status: processing | error | done.
offsetstringoptionalID of last document.
limitintegeroptionalMaximum number of documents per page.
order_byobjectoptionalField name and direction - [asc, desc].
masklistoptionalMasks fields in response. Returns just subset of stored object.

Sample request

{
  "query": {
    "status": "done"
  },
  "limit": 20
}
POST/generative/translate10 credits

10 credits (charged against the central incore ledger)

Parameters

NameTypeRequiredDescription
inputLocalestringrequiredLocale (typically iso 639-1 code) - translate FROM.
outputLocalestringrequiredLocale (typically iso 639-1 code) - translate TO.
modelstringoptionalthinking/flash - default value is flash Default: flash
callbackstringoptionalWebhook 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.
modestringoptionalResponse 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
metadataanyoptionalSet of developer specified data.
tagsstring[]optionalDeveloper-supplied tags stored on the log entry (filterable in the usage log).
logstringoptionalWhat 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
valueobjectrequireddata 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.

POST/generative/nutrients25 credits

25 credits (charged against the central incore ledger)

Parameters

NameTypeRequiredDescription
servingsintegerrequiredNumber of servings.
ingredientsarrayrequiredList of ingredients: {"ingredient": string, "unit": "string", "quantity": any}
modelstringoptionalthinking/flash - default value is flash Default: flash
callbackstringoptionalWebhook 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.
modestringoptionalResponse 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
metadataanyoptionalSet of developer specified data.
tagsstring[]optionalDeveloper-supplied tags stored on the log entry (filterable in the usage log).
logstringoptionalWhat 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"
    }
  ]
}
POST/generative/realty15 credits

15 credits (charged against the central incore ledger)

Parameters

NameTypeRequiredDescription
dataobjectrequiredRealty data.
modelstringoptionalthinking/flash - default value is flash Default: flash
callbackstringoptionalWebhook 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.
modestringoptionalResponse 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
metadataanyoptionalSet of developer specified data.
tagsstring[]optionalDeveloper-supplied tags stored on the log entry (filterable in the usage log).
logstringoptionalWhat 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"
}
POST/generative/seo3 credits

3 credits (charged against the central incore ledger)

Parameters

NameTypeRequiredDescription
dataobjectrequiredDocument content as JSON (e.g. {"title": "...", "perex": "..."}). The model auto-detects the language from these values.
masklistoptionalSubset 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.
modelstringoptionalthinking/flash/claude/gpt - default value is flash Default: flash
callbackstringoptionalWebhook 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.
modestringoptionalResponse 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
metadataanyoptionalSet of developer specified data.
tagsstring[]optionalDeveloper-supplied tags stored on the log entry (filterable in the usage log).
logstringoptionalWhat 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.

POST/generative/jsonld5 credits

5 credits (charged against the central incore ledger)

Parameters

NameTypeRequiredDescription
dataobjectrequiredDocument content as JSON (e.g. {"title": "...", "ingredients": [...]}). The model auto-detects the language from these values and only uses facts present in the data.
typeslistoptionalschema.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.
modelstringoptionalthinking/flash/claude/gpt - default value is flash Default: flash
callbackstringoptionalWebhook 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.
modestringoptionalResponse 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
metadataanyoptionalSet of developer specified data.
tagsstring[]optionalDeveloper-supplied tags stored on the log entry (filterable in the usage log).
logstringoptionalWhat 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"
  ]
}