AI
Ask the AI about your data
Answers in natural language a question about the data of your account, optionally also searching the web.
Request examples
curl https://app.filmo.io/api/v1/ai/ask \
--request POST \
--header "Authorization: Bearer $FILMO_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"question": "¿Qué pedidos tengo confirmados la semana que viene y qué material sale en ellos?",
"webSearch": false,
"mode": "instant"
}'Generated from the schema
It NEVER writes anything: the engine runs without a single write tool loaded, and what it can read is bounded by the permission guardrail of the owner of the API key, table by table. It consumes AI credits of the account: without quota it responds 402 addon_required without ever asking the model. It can take tens of seconds on questions that chain several queries; if needsMoreContext comes true, the answer is empty and you should rephrase with more detail instead of retrying the same.
Authorizations
Bearer API key with the scope below. ai:ask
Body
Body schema: AiAskBody
Natural-language question about the data of your account. Required.
Limits: min length 1, max length 4000
Also allows web search to answer. Defaults to false: only the data of the account is consulted.
Answer mode. Today only "instant" (a single pass, no conversation). Documented so that future modes are additive.
Available options: instant
Response
Successful response.
Response schema: AiAskDto
Envelope: AiAskResponse. meta. is present only when the operation is deprecated.
Headers: X-Request-Id · RateLimit-Limit · RateLimit-Remaining · RateLimit-Reset · ETag
The ai ask, as returned by the API.
Show child attributesHide child attributes
Answer in markdown. Empty string when needsMoreContext is true.
True when the AI finished without being able to answer and needs more context. In that case answer comes empty: rephrase the question with more detail instead of retrying as is.
Cited web sources. Empty if web search was not requested or if none was used.
Show child attributesHide child attributes
URL of the consulted source.
Source title.
URL of the site favicon, to render the source.
Additional information about the response.
Show child attributesHide child attributes
Lifecycle warnings; present only when the operation is deprecated.
Show child attributesHide child attributes
Stable warning code.
Available options: deprecated
For people: what is deprecated, until when, and what to use.
Day (YYYY-MM-DD) the operation stops being served.
operationId of the operation to use instead, or null if there is none.
Where the deprecation is documented (the changelog).
Invalid request (validation_error): malformed query or body. errors[] lists every offending field with its stable code.
Headers: X-Request-Id · Content-Language · RateLimit-Limit · RateLimit-Remaining · RateLimit-Reset
Authentication failed (unauthorized, api_key_invalid, api_key_revoked, api_key_expired, api_key_owner_inactive, api_key_owner_not_admin).
Headers: X-Request-Id · Content-Language
Add-on required (addon_required): the account plan does not include the add-on this operation needs; requiredAddon names it.
Headers: X-Request-Id · Content-Language · RateLimit-Limit · RateLimit-Remaining · RateLimit-Reset
Not allowed (insufficient_scope: the API key does not have the required scope, named in requiredScope; forbidden: the owner of the key lacks the permission the operation requires). insufficient_scope is answered before the request counts against the rate limit, so it carries no RateLimit-* headers; forbidden does.
Headers: X-Request-Id · Content-Language
Resource not found (not_found): it does not exist or is outside the scope of the API key.
Headers: X-Request-Id · Content-Language · RateLimit-Limit · RateLimit-Remaining · RateLimit-Reset
Conflict (conflict): the current state of the resource prevents the operation, a request with that Idempotency-Key is already in progress, or another conditional write (If-Match) held the resource for more than five seconds. errors[0]. says which: in_progress and lock_timeout are solved by retrying; invalid_state is not, because the state of the resource forbids the operation.
Headers: X-Request-Id · Content-Language · RateLimit-Limit · RateLimit-Remaining · RateLimit-Reset
Rate limit exceeded (rate_limited): retry after Retry-After seconds; RateLimit-* says which quota ran out.
Headers: X-Request-Id · Content-Language · RateLimit-Limit · RateLimit-Remaining · RateLimit-Reset · Retry-After
Internal error (internal_error).
Headers: X-Request-Id · Content-Language · RateLimit-Limit · RateLimit-Remaining · RateLimit-Reset
Errors
| Status | Codes | Meaning |
|---|---|---|
| 400 | validation_error | Malformed query or body. errors[] lists every offending field with its stable code. |
| 402 | addon_required | The account plan does not include the add-on this operation needs; requiredAddon names it. |
| 404 | not_found | It does not exist or is outside the scope of the API key. |
| 409 | conflict | The current state of the resource prevents the operation, a request with that Idempotency-Key is already in progress, or another conditional write (If-Match) held the resource for more than five seconds. errors[0]. says which: in_progress and lock_timeout are solved by retrying; invalid_state is not, because the state of the resource forbids the operation. |
401, 403, 429, 500 can be returned by any operation. Errors
Deprecation
This operation is not deprecated. Deprecations are announced with a Deprecation header and a sunset date. Versioning policy
Related
Was this page helpful?