Skip to main content
For pricing information, please refer to Domo’s online consumption terms (https://www.domo.com/consumption-terms) and the credit rate card in your Domo instance (Admin > Company Settings > Credit Utilization > Rate Card) for more information.
Authentication: Using a Developer Token is required to access the Product APIs. See the API Authentication page for more information.

Text Generation

Generate text based on the given text input. Method: POST
Endpoint: /api/ai/v1/text/generation" Request Body Attributes:
  • input - The input text to send to the model.
    • String
    • Required
  • model - The ID of the model to use for Text Generation if other than the configured default. The specified model must be Domo-provided or configured for the Text Generation AI Service by an Admin.
    • String
    • Optional
  • modelConfiguration - Additional model-specific configuration key-value pairs. e.g. temperature, max_tokens, etc.
    • Object
    • Optional
  • promptTemplate - A prompt template string that contains placeholders for parameters that will be replaced with parameter values before the prompt is submitted to the model. If not provided, the default prompt template will be used. Examples: "${input}", "${system}\n${input}".
    • String
    • Optional
  • parameters - Custom parameters to inject into the prompt template if an associated placeholder is present.
    • Object
    • Optional
  • system - The system message to use for the Text Generation task. If not provided, the default system message will be used. If the model does not include built-in support for system prompts, this parameter may be included in the prompt template using the ”$” placeholder.
    • String
    • Optional
Basic Example: Minimal text generation request using the default model, system message and prompt template.
Prompt Template Example: Text generation request leveraging prompt template and specifying the model to use.
System Message Example: Text generation with a system message
Response:
The generated text.

Text-to-SQL

Generate SQL based on the given text input and schemas Method: POST Endpoint: /api/ai/v1/text/sql Request Body Attributes:
  • input - The input text to send to the model.
    • String
    • Required
  • dataSourceSchemas - A set of schemas
    • Array
    • Required
  • model - The ID of the model to use for the Text-to-SQL request if other than the configured default. The specified model must be Domo-provided or configured for the Text-to-SQL AI Service by an Admin.
    • String
    • Optional
  • modelConfiguration - Additional model-specific configuration key-value pairs. e.g. temperature, max_tokens, etc.
    • Object
    • Optional
  • promptTemplate - A prompt template string that contains placeholders for parameters that will be replaced with parameter values before the prompt is submitted to the model. If not provided, the default prompt template will be used.
    • String
    • Optional
  • parameters - Custom parameters to inject into the prompt template if an associated placeholder is present.
    • Object
    • Optional
  • system - The system message to use for the Text-to-SQL task. If not provided, the default system message will be used. If the model does not include built-in support for system prompts, this parameter may be included in the prompt template using the ”$” placeholder.
    • String
    • Optional
Basic Example: Minimal Text-to-SQL request using the default model, system message and prompt template.
Response:
The generated SQL query.

Text Summarization

Generate a summary based on the given text input. Method: POST
Endpoint: https://{instance}.domo.com/api/ai/v1/text/summarize Request Body Attributes:
  • input - The input text to send to the model.
    • String
    • Required
  • outputStyle - The formatting of the summarized output. One of BULLETED, NUMBERED, or PARAGRAPH
    • String
    • Optional
  • outputWordLength - The minimum or maximum number of words to use in the summarized output. Performed on a best-effort basis. Example: {"min": 5, "max": 10}
    • Object
    • Optional
  • model - The ID of the model to use for Text Summarization if other than the configured default. The specified model must be Domo-provided or configured for the Text Summarization AI Service by an Admin.
    • String
    • Optional
  • modelConfiguration - Additional model-specific configuration key-value pairs. e.g. temperature, max_tokens, etc.
    • Object
    • Optional
  • promptTemplate - A prompt template string that contains placeholders for parameters that will be replaced with parameter values before the prompt is submitted to the model. If not provided, the default prompt template will be used.
    • String
    • Optional
  • parameters - Custom parameters to inject into the prompt template if an associated placeholder is present.
    • Object
    • Optional
  • system - The system message to use for the Text Generation task. If not provided, the default system message will be used. If the model does not include built-in support for system prompts, this parameter may be included in the prompt template using the ”$” placeholder.
    • String
    • Optional
Basic Example: Minimal text summarization request.
Customized Example: Text summarization request with custom output formatting and length
Response:
The generated text summary.