Skip to content

InlineAiModelDefinition

A model you define in full when you start a run, for one that isn’t in Maitento’s catalogue, such as a model on your own endpoint. Nothing is stored: only that run uses it. Its key and endpoint are not here: give them in the start request’s credentials, with a provider that matches this model’s credentialProvider.

Kind: an object, used in requests and responses. In a request it is called InlineAiModelDefinitionInput.

FieldTypeRequiredDescription
namestringyesA display name for the model, shown in logs and token usage. Constraints: required (empty or whitespace-only strings are rejected).
apiTypestringyesThe protocol the endpoint speaks: "OpenAi" or "Anthropic". Constraints: required (empty or whitespace-only strings are rejected).
modelIdentifierstringyesThe model id sent to the endpoint, exactly as the provider expects it. Constraints: required (empty or whitespace-only strings are rejected).
credentialProviderstringyesA name of your own for this model’s key: the start request’s credentials whose provider matches it are used. A model defined inline never falls back to Maitento’s own key. Constraints: required (empty or whitespace-only strings are rejected).
contextWindowTokensintegerThe model’s context window, in tokens. Constraints: range: 1..2147483647.
maxOutputTokensintegerThe most the model may write in one reply, in tokens. Constraints: range: 1..2147483647.
supportsJsonSchemaResponseFormatbooleanWhether the endpoint accepts response_format=json_schema. False makes Maitento use json_object and restate the schema in the prompt instead. Default: true; send the real answer for your endpoint.
tokenizerFamilystring | nullWhich tokenizer to estimate the model’s token counts with. Null: worked out from the model’s name.
reasoningEffortstring | nullThe reasoning_effort sent with every request. Set it for a reasoning model whose own default doesn’t work with tool calls, since every interaction sends tools. Null: not sent.
{
"name": "...",
"apiType": "...",
"modelIdentifier": "...",
"credentialProvider": "...",
"contextWindowTokens": 0,
"maxOutputTokens": 0,
"supportsJsonSchemaResponseFormat": false,
"tokenizerFamily": "...",
"reasoningEffort": "..."
}

Every field is present in a response; empty ones are null.

FieldTypeDescription
namestringA display name for the model, shown in logs and token usage. Constraints: required (empty or whitespace-only strings are rejected).
apiTypestringThe protocol the endpoint speaks: "OpenAi" or "Anthropic". Constraints: required (empty or whitespace-only strings are rejected).
modelIdentifierstringThe model id sent to the endpoint, exactly as the provider expects it. Constraints: required (empty or whitespace-only strings are rejected).
credentialProviderstringA name of your own for this model’s key: the start request’s credentials whose provider matches it are used. A model defined inline never falls back to Maitento’s own key. Constraints: required (empty or whitespace-only strings are rejected).
contextWindowTokensintegerThe model’s context window, in tokens. Constraints: range: 1..2147483647.
maxOutputTokensintegerThe most the model may write in one reply, in tokens. Constraints: range: 1..2147483647.
supportsJsonSchemaResponseFormatbooleanWhether the endpoint accepts response_format=json_schema. False makes Maitento use json_object and restate the schema in the prompt instead. Default: true; send the real answer for your endpoint.
tokenizerFamilystring | nullWhich tokenizer to estimate the model’s token counts with. Null: worked out from the model’s name.
reasoningEffortstring | nullThe reasoning_effort sent with every request. Set it for a reasoning model whose own default doesn’t work with tool calls, since every interaction sends tools. Null: not sent.
{
"name": "...",
"apiType": "...",
"modelIdentifier": "...",
"credentialProvider": "...",
"contextWindowTokens": 0,
"maxOutputTokens": 0,
"supportsJsonSchemaResponseFormat": false,
"tokenizerFamily": "...",
"reasoningEffort": "..."
}