SheetAI Function Reference
Complete reference of all available functions in SheetAI App. Looking for usage examples? Click here.
SHEETAI
ExamplesThe main AI function. Outputs the result in a single cell. Use it for content generation, data analysis, summarization, and any general-purpose AI task.
Syntax
=SHEETAI(prompt, response_token, temperature, model, cache, use_translation, target_language, api_key)Copy/paste example
=SHEETAI("write a tagline for salon")In some locales, you might need to use ; to separate parameters instead of ,
| Parameter | Definition |
|---|---|
| prompt* | Text, cell, or range containing the prompt. Examples: "Write a tagline for an ice cream shop." or A1 |
| response_token | Maximum number of tokens for the response. Defaults to 1000. |
| temperature | Number between 0 and 1 that governs creativity. 0 = strict (default 0.4), 1 = very creative. |
| model | AI model to use. Defaults to "t" (gpt-3.5-turbo). See supported models below. |
| cache | true/false. Defaults to true. Saves API credits for repeated prompts. Set to false for different responses from the same prompt. |
| use_translation | Set to true to enable built-in translation. |
| target_language | Language to translate to when use_translation is true. |
| api_key | Optional. Override the saved API key for this call. |
SHEETAI_LIST
ExamplesLike SHEETAI, but outputs results in a column. Very practical when the output is a list of items, ideas, or variations.
Syntax
=SHEETAI_LIST(prompt, response_token, temperature, model, cache, api_key)Copy/paste example
=SHEETAI_LIST("Give me 5 good short ads about spreadsheets.")In some locales, you might need to use ; to separate parameters instead of ,
| Parameter | Definition |
|---|---|
| prompt* | Text, cell, or range containing the prompt. |
| response_token | Maximum number of tokens. Defaults to 1000. |
| temperature | Creativity (0-1). Defaults to 0.4. |
| model | AI model. Defaults to "t" (gpt-3.5-turbo). |
| cache | true/false. Defaults to true. |
| api_key | Optional API key override. |
SHEETAI_TABLE
ExamplesLike SHEETAI, but outputs results in a table format. Very practical when you need structured data with rows and columns.
Syntax
=SHEETAI_TABLE(prompt, response_token, temperature, model, cache, api_key)Copy/paste example
=SHEETAI_TABLE("top 10 most eaten fruits and their nutrition data")In some locales, you might need to use ; to separate parameters instead of ,
| Parameter | Definition |
|---|---|
| prompt* | Text, cell, or range containing the prompt. You can include headers in the prompt to control column structure. |
| response_token | Maximum number of tokens. Defaults to 1000. |
| temperature | Creativity (0-1). Defaults to 0.7. |
| model | AI model. Defaults to "t" (gpt-3.5-turbo). |
| cache | true/false. Defaults to true. |
| api_key | Optional API key override. |
SHEETAI_FILL
ExamplesMagically fill or clean a range from a few examples. Provide complete examples and the function learns the pattern to fill in the rest.
Syntax
=SHEETAI_FILL(examples, partial, response_token, temperature, model, cache, api_key)In some locales, you might need to use ; to separate parameters instead of ,
| Parameter | Definition |
|---|---|
| examples* | Range containing complete examples that AI should learn from. |
| partial | Range containing incomplete data that AI should complete from the examples. |
| response_token | Maximum number of tokens. Defaults to 1000. |
| temperature | Creativity (0-1). Defaults to 0.4. |
| model | AI model. Defaults to "t" (gpt-3.5-turbo). |
| cache | true/false. Defaults to true. |
| api_key | Optional API key override. |
SHEETAI_TAG
ExamplesApplies user-defined tags to a given text. The AI analyzes the content and returns the most relevant tags from your list.
Syntax
=SHEETAI_TAG(text, tags, response_token, temperature, model, cache, api_key)Copy/paste example
=SHEETAI_TAG("I love chocolate", "food, positive, negative")In some locales, you might need to use ; to separate parameters instead of ,
| Parameter | Definition |
|---|---|
| text* | Text, cell, or range to tag. |
| tags* | Comma-separated tags or range of tags applicable to the text. |
| response_token | Maximum number of tokens. Defaults to 1000. |
| temperature | Creativity (0-1). Defaults to 0.4. |
| model | AI model. Defaults to "t" (gpt-3.5-turbo). |
| cache | true/false. Defaults to true. |
| api_key | Optional API key override. |
SHEETAI_CLASSIFY
ExamplesClassifies a given text into a single category from your list. Only the most relevant category is returned.
Syntax
=SHEETAI_CLASSIFY(text, categories, response_token, temperature, model, cache, api_key)Copy/paste example
=SHEETAI_CLASSIFY("banana", "fruit, vegetable")In some locales, you might need to use ; to separate parameters instead of ,
| Parameter | Definition |
|---|---|
| text* | Text, cell, or range to classify. |
| categories* | Comma-separated categories or range of categories to choose from. |
| response_token | Maximum number of tokens. Defaults to 1000. |
| temperature | Creativity (0-1). Defaults to 0.4. |
| model | AI model. Defaults to "t" (gpt-3.5-turbo). |
| cache | true/false. Defaults to true. |
| api_key | Optional API key override. |
SHEETAI_EXTRACT
ExamplesExtracts specific data (like email addresses, company names, dates) from text. Outputs as comma-separated values.
Syntax
=SHEETAI_EXTRACT(text, to_extract, response_token, temperature, model, cache, api_key)Copy/paste example
=SHEETAI_EXTRACT("I worked 12 years at Amazon.com and Apple", "companies")In some locales, you might need to use ; to separate parameters instead of ,
| Parameter | Definition |
|---|---|
| text* | Text, cell, or range to extract data from. |
| to_extract* | What to extract. Examples: "email addresses", "company names", "dates", "phone numbers". |
| response_token | Maximum number of tokens. Defaults to 1000. |
| temperature | Creativity (0-1). Defaults to 0.4. |
| model | AI model. Defaults to "t" (gpt-3.5-turbo). |
| cache | true/false. Defaults to true. |
| api_key | Optional API key override. |
SHEETAI_TRANSLATE
ExamplesTranslates text from one language into another. Works best when you specify the source language.
Syntax
=SHEETAI_TRANSLATE(text, target_language, response_token, temperature, model, cache, api_key)Copy/paste example
=SHEETAI_TRANSLATE("Cool off with our delicious treats!", "spanish")In some locales, you might need to use ; to separate parameters instead of ,
| Parameter | Definition |
|---|---|
| text* | Text, cell, or range to translate. |
| target_language* | Language of the output. Examples: "spanish", "chinese", "french", "hindi". |
| response_token | Maximum number of tokens. Defaults to 1000. |
| temperature | Creativity (0-1). Defaults to 0.4. |
| model | AI model. Defaults to "t" (gpt-3.5-turbo). |
| cache | true/false. Defaults to true. |
| api_key | Optional API key override. |
SHEETAI_SUMMARIZE
ExamplesCreates concise summaries of longer text. Distills key points and main ideas from articles, documents, and any content.
Syntax
=SHEETAI_SUMMARIZE(text, response_token, temperature, model, cache, api_key)In some locales, you might need to use ; to separate parameters instead of ,
| Parameter | Definition |
|---|---|
| text* | Text, cell, or range to summarize. |
| response_token | Maximum number of tokens. Defaults to 1000. |
| temperature | Creativity (0-1). Defaults to 0.4. |
| model | AI model. Defaults to "t" (gpt-3.5-turbo). |
| cache | true/false. Defaults to true. |
| api_key | Optional API key override. |
SHEETAI_IMAGE
ExamplesGenerates AI images directly in your spreadsheet cells from text descriptions.
Syntax
=SHEETAI_IMAGE(prompt, size, temperature, cache, provider, api_key)Copy/paste example
=SHEETAI_IMAGE("a cat wearing sunglasses")In some locales, you might need to use ; to separate parameters instead of ,
| Parameter | Definition |
|---|---|
| prompt* | Text description of the image to generate. |
| size | Image dimensions. Defaults to "256x256". Options: "256x256", "512x512", "1024x1024". |
| temperature | Creativity (0-1). Defaults to 0.4. |
| cache | true/false. Defaults to true. |
| provider | Image generation provider. Defaults to "openai". |
| api_key | Optional API key override. |
SHEETAI_BRAIN
ExamplesAI assistant with persistent memory and context. Stores and retrieves information across your spreadsheets.
Syntax
=SHEETAI_BRAIN(prompt, cache)In some locales, you might need to use ; to separate parameters instead of ,
| Parameter | Definition |
|---|---|
| prompt* | Your prompt or question for the AI brain. |
| cache | true/false. Defaults to true. |
SHEETAI_API
ExamplesMakes HTTP API calls directly from Google Sheets. Supports GET, POST, PUT, PATCH, DELETE with custom headers and request bodies. Use keyPath to extract specific values from JSON responses.
Syntax
=SHEETAI_API(url, method, headersJson, bodyJson, keyPath)Copy/paste example
=SHEETAI_API("https://api.example.com/users/1", "GET", "", "", "data.name")In some locales, you might need to use ; to separate parameters instead of ,
| Parameter | Definition |
|---|---|
| url* | The API endpoint URL. |
| method | HTTP method: "GET", "POST", "PUT", "PATCH", "DELETE". Defaults to "GET". |
| headersJson | JSON string of headers. Example: '{"Authorization": "Bearer token"}'. |
| bodyJson | JSON string of the request body for POST/PUT/PATCH. |
| keyPath | Dot notation path to extract a specific value. Example: "data.users[0].name". |
SHEETAI_PJSON
ExamplesParses JSON strings and extracts specific values using dot notation and array indexing. Useful for working with API responses stored in cells.
Syntax
=SHEETAI_PJSON(jsonString, keyPath)In some locales, you might need to use ; to separate parameters instead of ,
| Parameter | Definition |
|---|---|
| jsonString* | A cell containing a JSON string. |
| keyPath* | Dot notation path to extract. Examples: "data.name", "results[0].id", "users[2].email". |
GeminiAI
Use Google Gemini models directly in Google Sheets. Requires a Gemini API key.
Syntax
=GeminiAI(prompt, model, maxTokens, temperature, api_key)Copy/paste example
=GeminiAI("explain quantum computing simply")In some locales, you might need to use ; to separate parameters instead of ,
| Parameter | Definition |
|---|---|
| prompt* | Text, cell, or range containing the prompt. |
| model | Gemini model. Defaults to "gemini-pro". |
| maxTokens | Maximum tokens. Defaults to 1000. |
| temperature | Creativity (0-1). Defaults to 0.4. |
| api_key | Your Gemini API key. |
Supported Models
Pass these as the model parameter in any SHEETAI function. Use shorthand codes or full names.
You can also use =SHEETAI_MODELS() in a cell to see the full list.
| Shorthand | Full Model Name | Provider |
|---|---|---|
| "t" (default) | gpt-3.5-turbo | OpenAI |
| "4" | gpt-4 | OpenAI |
| "4o" | gpt-4o | OpenAI |
| "4o-m" | gpt-4o-mini | OpenAI |
| "o1-p" | o1-preview | OpenAI |
| "o1-m" | o1-mini | OpenAI |
| "t-16k" | gpt-3.5-turbo-16k | OpenAI |
| - | grok-beta / grok-2-1212 | xAI |
| - | grok-3 | xAI |
| "c3" | claude-3-opus-20240229 | Anthropic |
| "c3s" | claude-3-sonnet-20240229 | Anthropic |
| "c3h" | claude-3-haiku-20240307 | Anthropic |
| - | deepseek-chat | DeepSeek |
| "g" | gemini-2.0-flash |
Common Optional Parameters
These parameters are shared across all SHEETAI functions and are always optional.
temperature
Number between 0 and 1 that controls creativity. 0 = strictly follow the prompt. 0.5 = slightly creative. 1 = very creative. In some locales, use 0,5 instead of 0.5.
response_token / maxTokens
Maximum number of tokens to generate. Must be a round number greater than 0. Defaults to 1000. Values over 500 in spreadsheet functions may risk a timeout. For long-form content, use the SheetAI Sidebar.
cache
true (default) or false. When enabled, saves API credits by caching responses for identical prompts. Set to false to get a different response from the same prompt each time.
api_key
Override the saved API key for a specific call. Useful when using multiple API keys or testing.
Need help?
Check the examples page for usage examples, or reach out at support@sheetai.app