API Reference · Overview
Data Types
Nyckel supports three input data types — Text, Image, and Tabular — and the request/response shape of every invoke and sample endpoint depends on which one your Function is configured for.
Text
Requests pass text data as a JSON string. Responses return the text the same way.
Image
Image data can be sent two ways:
- Raw image bytes in a
multipart/form-datarequest, or - A data URI inside an
application/jsonrequest.
Image responses come back as a JSON string, either as a URL pointing to the image resource or as a data URI containing the image bytes.
Tabular
Tabular data is sent as a JSON object — {"key": "value", ...}. Keys
may be either field ids or field names. Values must be:
- JSON strings for Text or Image fields,
- JSON numbers for Number fields.
For image fields inside a tabular row, use either an internet-accessible image URL or a data URI. Tabular responses come back as a JSON object with string or number values.