Snowflake cortex-analyst API

The cortex-analyst API from Snowflake — 4 operation(s) for cortex-analyst.

Operations 9

POST /api/v2/cortex/analyst/feedback #
POST /api/v2/cortex/analyst/message Send a Data Question to the Cortex Analyst #
POST /api/v2/cortex/analyst/verified-query-suggestions Generate Vq Suggestions for a Semantic Model #
GET /api/v2/cortex/analyst/token Internal Endpoint to Exchange a Cortex Analyst Oauth Token #
POST /api/v2/cortex/analyst/fast-generation Rapidly generate a semantic model given source material #
POST /api/v2/cortex/analyst/pre-selection Retrieve relevant table information from input data for semantic model generation #
POST /api/v2/cortex/analyst/filters-and-metrics-suggestions Generate filters, facts, and metrics suggestions for a semantic model #
POST /api/v2/cortex/analyst/agentic-optimizations List all agentic optimization runs for a given base model #
GET /api/v2/cortex/analyst/agentic-optimization Get the status and state of a specified agentic optimization run #

Documentation

📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/account
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/alert
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/api-integration
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/catalog-integration
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/compute-pool
📖
Documentation
https://docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-analyst/rest-api
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/cortex-inference
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/cortex-search-service
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/database-role
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/database
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/dynamic-table
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/event-table
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/external-volume
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/function
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/grant
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/iceberg-table
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/image-repository
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/managed-account
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/network-policy
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/notebook
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/notification-integration
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/pipe
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/procedure
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/result
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/role
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/schema
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/service
📖
Documentation
https://docs.snowflake.com/en/developer-guide/sql-api/index
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/stage
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/stream
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/table
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/task
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/user-defined-function
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/user
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/view
📖
Documentation
https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/reference/warehouse

Specifications

Schemas & Data

Other Resources

🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/account-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/alert-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/api-integration-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/catalog-integration-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/compute-pool-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/cortex-analyst-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/cortex-inference-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/cortex-search-service-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/database-role-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/database-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/dynamic-table-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/event-table-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/external-volume-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/function-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/grant-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/iceberg-table-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/image-repository-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/managed-account-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/network-policy-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/notebook-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/notification-integration-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/pipe-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/procedure-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/role-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/schema-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/service-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/sqlapi-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/snowflake-sql-rest-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/stage-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/stream-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/table-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/task-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/user-defined-function-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/user-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/view-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/json-ld/warehouse-context.jsonld
🔗
Overlay
https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/overlays/snowflake-cortex-analyst-overlay.yaml

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/snowflake-cortex-analyst-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

snowflake-cortex-analyst-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Snowflake Cortex Analyst API
  version: 0.0.1
  contact:
    name: Snowflake, Inc.
    url: https://snowflake.com
    email: support@snowflake.com
  description: 'Operations tagged cortex-analyst across 2 of this provider''s published API definitions: cortex-analyst.yaml, cortex-analyst.yaml. Each path carries the servers of the definition it was published in.'
servers:
- description: Snowflake API
  url: https://org-account.snowflakecomputing.com
tags:
- name: cortex-analyst
paths:
  /api/v2/cortex/analyst/feedback:
    post:
      operationId: sendFeedback
      tags:
      - cortex-analyst
      description: Send a user feedback of Cortex Analyst response
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendFeedbackRequest'
            examples:
              SendfeedbackRequestExample:
                summary: Default sendFeedback request
                x-microcks-default: true
                value:
                  request_id: '500123'
                  positive: true
                  feedback_message: example_value
      responses:
        '200':
          $ref: common.yaml#/components/responses/200SuccessResponse
        '400':
          $ref: common.yaml#/components/responses/400BadRequest
        '401':
          $ref: common.yaml#/components/responses/401Unauthorized
        '403':
          $ref: common.yaml#/components/responses/403Forbidden
        '404':
          $ref: common.yaml#/components/responses/404NotFound
        '405':
          $ref: common.yaml#/components/responses/405MethodNotAllowed
        '429':
          $ref: common.yaml#/components/responses/429LimitExceeded
        '500':
          $ref: common.yaml#/components/responses/500InternalServerError
        '503':
          $ref: common.yaml#/components/responses/503ServiceUnavailable
        '504':
          $ref: common.yaml#/components/responses/504GatewayTimeout
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      security:
      - KeyPair: []
      - ExternalOAuth: []
      - SnowflakeOAuth: []
    servers:
    - description: Snowflake API
      url: https://org-account.snowflakecomputing.com
  /api/v2/cortex/analyst/message:
    post:
      operationId: sendMessage
      tags:
      - cortex-analyst
      summary: Send a Data Question to the Cortex Analyst
      description: Send a data question to the Cortex Analyst
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendMessageRequest'
            examples:
              SendmessageRequestExample:
                summary: Default sendMessage request
                x-microcks-default: true
                value:
                  semantic_model_file: example_value
                  semantic_model: example_value
                  semantic_view: example_value
                  semantic_models:
                  - semantic_model_file: example_value
                    semantic_view: example_value
                    inline_semantic_model: example_value
                  stream: true
                  operation: sql_generation
                  warehouse: example_value
                  messages:
                  - role: user
                    content: {}
                  source: example_value
                  experimental: example_value
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendMessageResponse'
              examples:
                Sendmessage200Example:
                  summary: Default sendMessage 200 response
                  x-microcks-default: true
                  value:
                    message:
                      role: user
                      content:
                      - {}
                    request_id: '500123'
                    warnings:
                    - message: example_value
                    semantic_model_selection:
                      index: 10
                    response_metadata: example_value
            text/event-stream:
              schema:
                type: string
              examples:
                Sendmessage200Example:
                  summary: Default sendMessage 200 response
                  x-microcks-default: true
                  value: example_value
        '400':
          $ref: common.yaml#/components/responses/400BadRequest
        '401':
          $ref: common.yaml#/components/responses/401Unauthorized
        '403':
          $ref: common.yaml#/components/responses/403Forbidden
        '404':
          $ref: common.yaml#/components/responses/404NotFound
        '405':
          $ref: common.yaml#/components/responses/405MethodNotAllowed
        '429':
          $ref: common.yaml#/components/responses/429LimitExceeded
        '500':
          $ref: common.yaml#/components/responses/500InternalServerError
        '503':
          $ref: common.yaml#/components/responses/503ServiceUnavailable
        '504':
          $ref: common.yaml#/components/responses/504GatewayTimeout
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      security:
      - KeyPair: []
      - ExternalOAuth: []
      - SnowflakeOAuth: []
    servers:
    - description: Snowflake API
      url: https://org-account.snowflakecomputing.com
  /api/v2/cortex/analyst/verified-query-suggestions:
    post:
      operationId: generateVerifiedQuerySuggestions
      tags:
      - cortex-analyst
      summary: Generate Vq Suggestions for a Semantic Model
      description: Generate VQ suggestions for a semantic model
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateVerifiedQuerySuggestionsRequest'
            examples:
              GenerateverifiedquerysuggestionsRequestExample:
                summary: Default generateVerifiedQuerySuggestions request
                x-microcks-default: true
                value:
                  semantic_model:
                    semantic_model_file: example_value
                    semantic_view: example_value
                    inline_semantic_model: example_value
                  warehouse: example_value
                  experimental: example_value
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateVerifiedQuerySuggestionsResponse'
              examples:
                Generateverifiedquerysuggestions200Example:
                  summary: Default generateVerifiedQuerySuggestions 200 response
                  x-microcks-default: true
                  value:
                    request_id: '500123'
                    vq_suggestions:
                    - score: 42.5
                    warnings:
                    - message: example_value
        '400':
          $ref: common.yaml#/components/responses/400BadRequest
        '401':
          $ref: common.yaml#/components/responses/401Unauthorized
        '403':
          $ref: common.yaml#/components/responses/403Forbidden
        '404':
          $ref: common.yaml#/components/responses/404NotFound
        '405':
          $ref: common.yaml#/components/responses/405MethodNotAllowed
        '429':
          $ref: common.yaml#/components/responses/429LimitExceeded
        '500':
          $ref: common.yaml#/components/responses/500InternalServerError
        '503':
          $ref: common.yaml#/components/responses/503ServiceUnavailable
        '504':
          $ref: common.yaml#/components/responses/504GatewayTimeout
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      security:
      - KeyPair: []
      - ExternalOAuth: []
      - SnowflakeOAuth: []
    servers:
    - description: Snowflake API
      url: https://org-account.snowflakecomputing.com
  /api/v2/cortex/analyst/token:
    get:
      operationId: getScopedToken
      summary: Internal Endpoint to Exchange a Cortex Analyst Oauth Token
      description: Internal endpoint to exchange a Cortex Analyst Oauth token
      tags:
      - cortex-analyst
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenInfo'
              examples:
                Getscopedtoken200Example:
                  summary: Default getScopedToken 200 response
                  x-microcks-default: true
                  value:
                    token: example_value
                    expiration_seconds: 10
        '400':
          $ref: common.yaml#/components/responses/400BadRequest
        '401':
          $ref: common.yaml#/components/responses/401Unauthorized
        '403':
          $ref: common.yaml#/components/responses/403Forbidden
        '404':
          $ref: common.yaml#/components/responses/404NotFound
        '405':
          $ref: common.yaml#/components/responses/405MethodNotAllowed
        '429':
          $ref: common.yaml#/components/responses/429LimitExceeded
        '500':
          $ref: common.yaml#/components/responses/500InternalServerError
        '503':
          $ref: common.yaml#/components/responses/503ServiceUnavailable
        '504':
          $ref: common.yaml#/components/responses/504GatewayTimeout
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      security:
      - KeyPair: []
      - ExternalOAuth: []
      - SnowflakeOAuth: []
    servers:
    - description: Snowflake API
      url: https://org-account.snowflakecomputing.com
  /api/v2/cortex/analyst/fast-generation:
    post:
      operationId: fastGeneration
      tags:
      - cortex-analyst
      summary: Rapidly generate a semantic model given source material
      description: Provides real-time suggestions for improving a given semantic model via a streaming response.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FastGenerationRequest'
      responses:
        '200':
          description: OK. Streaming suggestions.
          content:
            text/event-stream:
              schema:
                type: string
                description: 'Server-Sent Events stream. Each event''s data payload will be a JSON representation of a `FastGenerationResponse` object.

                  Events include:

                  - `response`: Contains a `FastGenerationResponse` payload.

                  - `error`: Contains a `StreamingError` payload if an error occurs during streaming.

                  - `done`: Contains the string payload "done"'
        '400':
          $ref: common.yaml#/components/responses/400BadRequest
        '401':
          $ref: common.yaml#/components/responses/401Unauthorized
        '403':
          $ref: common.yaml#/components/responses/403Forbidden
        '404':
          $ref: common.yaml#/components/responses/404NotFound
        '405':
          $ref: common.yaml#/components/responses/405MethodNotAllowed
        '429':
          $ref: common.yaml#/components/responses/429LimitExceeded
        '500':
          $ref: common.yaml#/components/responses/500InternalServerError
        '503':
          $ref: common.yaml#/components/responses/503ServiceUnavailable
        '504':
          $ref: common.yaml#/components/responses/504GatewayTimeout
      security:
      - KeyPair: []
      - ExternalOAuth: []
      - SnowflakeOAuth: []
      - ProgrammaticAccessToken: []
    servers:
    - description: Snowflake API
      url: https://org-account.snowflakecomputing.com
  /api/v2/cortex/analyst/pre-selection:
    post:
      operationId: preSelection
      tags:
      - cortex-analyst
      summary: Retrieve relevant table information from input data for semantic model generation
      description: Retrieve relevant table information from input data for semantic model generation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PreSelectionRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreSelectionResponse'
        '400':
          $ref: common.yaml#/components/responses/400BadRequest
        '401':
          $ref: common.yaml#/components/responses/401Unauthorized
        '403':
          $ref: common.yaml#/components/responses/403Forbidden
        '404':
          $ref: common.yaml#/components/responses/404NotFound
        '405':
          $ref: common.yaml#/components/responses/405MethodNotAllowed
        '429':
          $ref: common.yaml#/components/responses/429LimitExceeded
        '500':
          $ref: common.yaml#/components/responses/500InternalServerError
        '503':
          $ref: common.yaml#/components/responses/503ServiceUnavailable
        '504':
          $ref: common.yaml#/components/responses/504GatewayTimeout
      security:
      - KeyPair: []
      - ExternalOAuth: []
      - SnowflakeOAuth: []
      - ProgrammaticAccessToken: []
    servers:
    - description: Snowflake API
      url: https://org-account.snowflakecomputing.com
  /api/v2/cortex/analyst/filters-and-metrics-suggestions:
    post:
      operationId: generateFiltersAndMetricsSuggestions
      tags:
      - cortex-analyst
      summary: Generate filters, facts, and metrics suggestions for a semantic model
      description: Generate suggestions for filters, facts, and metrics on a semantic view/model.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateFiltersAndMetricsSuggestionsRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateFiltersAndMetricsSuggestionsResponse'
        '400':
          $ref: common.yaml#/components/responses/400BadRequest
        '401':
          $ref: common.yaml#/components/responses/401Unauthorized
        '403':
          $ref: common.yaml#/components/responses/403Forbidden
        '404':
          $ref: common.yaml#/components/responses/404NotFound
        '405':
          $ref: common.yaml#/components/responses/405MethodNotAllowed
        '429':
          $ref: common.yaml#/components/responses/429LimitExceeded
        '500':
          $ref: common.yaml#/components/responses/500InternalServerError
        '503':
          $ref: common.yaml#/components/responses/503ServiceUnavailable
        '504':
          $ref: common.yaml#/components/responses/504GatewayTimeout
      security:
      - KeyPair: []
      - ExternalOAuth: []
      - SnowflakeOAuth: []
      - ProgrammaticAccessToken: []
    servers:
    - description: Snowflake API
      url: https://org-account.snowflakecomputing.com
  /api/v2/cortex/analyst/agentic-optimizations:
    post:
      operationId: listAgenticOptimizations
      tags:
      - cortex-analyst
      summary: List all agentic optimization runs for a given base model
      description: List all agentic optimization runs for a given base model
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListAgenticOptimizationsRequest'
      responses:
        '200':
          description: OK. Retrieved optimizations.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListAgenticOptimizationsResponse'
        '400':
          $ref: common.yaml#/components/responses/400BadRequest
        '401':
          $ref: common.yaml#/components/responses/401Unauthorized
        '403':
          $ref: common.yaml#/components/responses/403Forbidden
        '404':
          $ref: common.yaml#/components/responses/404NotFound
        '405':
          $ref: common.yaml#/components/responses/405MethodNotAllowed
        '429':
          $ref: common.yaml#/components/responses/429LimitExceeded
        '500':
          $ref: common.yaml#/components/responses/500InternalServerError
        '503':
          $ref: common.yaml#/components/responses/503ServiceUnavailable
        '504':
          $ref: common.yaml#/components/responses/504GatewayTimeout
      security:
      - KeyPair: []
      - ExternalOAuth: []
      - SnowflakeOAuth: []
      - ProgrammaticAccessToken: []
    servers:
    - description: Snowflake API
      url: https://org-account.snowflakecomputing.com
  /api/v2/cortex/analyst/agentic-optimization:
    get:
      operationId: getAgenticOptimization
      tags:
      - cortex-analyst
      summary: Get the status and state of a specified agentic optimization run
      description: Get the status and state of a specified agentic optimization run
      parameters:
      - name: optimization_name
        in: query
        description: The fully-qualified name of the optimization to retrieve.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK. Retrieved optimization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAgenticOptimizationResponse'
        '400':
          $ref: common.yaml#/components/responses/400BadRequest
        '401':
          $ref: common.yaml#/components/responses/401Unauthorized
        '403':
          $ref: common.yaml#/components/responses/403Forbidden
        '404':
          $ref: common.yaml#/components/responses/404NotFound
        '405':
          $ref: common.yaml#/components/responses/405MethodNotAllowed
        '429':
          $ref: common.yaml#/components/responses/429LimitExceeded
        '500':
          $ref: common.yaml#/components/responses/500InternalServerError
        '503':
          $ref: common.yaml#/components/responses/503ServiceUnavailable
        '504':
          $ref: common.yaml#/components/responses/504GatewayTimeout
      security:
      - KeyPair: []
      - ExternalOAuth: []
      - SnowflakeOAuth: []
      - ProgrammaticAccessToken: []
    servers:
    - description: Snowflake API
      url: https://org-account.snowflakecomputing.com
components:
  schemas:
    SemanticModelObject:
      type: object
      title: the semantic model object
      description: Represents a semantic model object
      properties:
        semantic_model_file:
          description: The path to a file stored in a Snowflake Stage holding the semantic model yaml. Must be a fully qualified stage url
          type: string
          example: '@db.schema.stage/path/to/file.yaml'
        semantic_view:
          description: The name of the Snowflake native semantic model object
          type: string
          example: db.schema.semantic_view
        inline_semantic_model:
          description: A string containing the entire semantic model yaml
          type: string
          example: 'name: my_semantic_model\ntables:\n  - name: orders\n...'
    TokenInfo:
      type: object
      properties:
        token:
          type: string
          example: example_value
        expiration_seconds:
          type: integer
          example: 10
    Warning:
      type: object
      title: The warning object
      description: Represents a warning within a chat.
      properties:
        message:
          type: string
          description: A human-readable message describing the warning
          example: example_value
    VerifiedQuery:
      type: object
      description: VerifiedQuery represents a (question, sql) pair that has been manually verified (e.g. by an analyst) to be correct.
      properties:
        name:
          type: string
          description: A name for this verified query. Mainly used for display purposes.
          example: Example Title
        question:
          type: string
          description: The question being answered.
          example: example_value
        sql:
          type: string
          description: The correct SQL query for answering the question.
          example: example_value
        verified_at:
          type: integer
          format: int64
          description: Timestamp at which the query was last verified - measures in seconds since epoch, in UTC.
          example: '2026-01-15T10:30:00Z'
        verified_by:
          type: string
          description: Name of the person who verified this query.
          example: example_value
    GenerateVerifiedQuerySuggestionsRequest:
      type: object
      description: The request object for getting VQ suggestions
      properties:
        semantic_model:
          $ref: '#/components/schemas/SemanticModelObject'
        warehouse:
          type: string
          description: Warehouse name to use for processing suggestions.
          example: example_value
        experimental:
          type: string
          description: JSON serialized string of experimental API fields (undocumented).
          example: example_value
      required:
      - semantic_model
    GenerateVerifiedQuerySuggestionsResponse:
      type: object
      description: The non-streaming response object for the VQ Suggestions request
      properties:
        request_id:
          type: string
          description: Unique request ID
          example: '500123'
        vq_suggestions:
          type: array
          items:
            $ref: '#/components/schemas/VerifiedQuerySuggestion'
          example: []
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/Warning'
          example: []
    SemanticModelSelection:
      type: object
      properties:
        index:
          description: The index of the selected semantic model
          type: integer
          format: int32
          example: 10
        identifier:
          $ref: '#/components/schemas/SemanticModelObject'
    SendFeedbackRequest:
      type: object
      description: The request object for sending user feedback on Cortex Analyst responses
      properties:
        request_id:
          type: string
          description: Request id associated with the feedback
          example: '500123'
        positive:
          type: boolean
          description: Whether the response was good (true) or bad (false)
          example: true
        feedback_message:
          type: string
          description: The text for the detailed feedback message
          example: example_value
      required:
      - request_id
      - positive
    MessageContent:
      type: object
      properties:
        type:
          type: string
          enum:
          - text
          - sql
          - suggestions
          - results
          - chart
          example: text
      discriminator:
        propertyName: type
        mapping:
          text: '#/components/schemas/MessageContentTextObject'
          sql: '#/components/schemas/MessageContentSqlObject'
          suggestions: '#/components/schemas/MessageContentSuggestionsObject'
          results: '#/components/schemas/MessageContentResultsObject'
          chart: '#/components/schemas/MessageContentChartObject'
    SendMessageRequest:
      type: object
      description: The request object for sendMessage requests
      properties:
        semantic_model_file:
          type: string
          description: The path to a file stored in a Snowflake Stage holding the semantic model yaml. Must be a fully qualified stage url
          example: '@db.schema.stage/path/to/file.yaml'
        semantic_model:
          type: string
          description: A string containing the entire semantic model yaml
          example: 'name: my_semantic_model\ntables:\n  - name: orders\n...'
        semantic_view:
          type: string
          description: The name of the Snowflake native semantic model object
          example: db.schema.semantic_view
        semantic_models:
          type: array
          description: A list of semantic model objects. If set, other semantic model properties are ignored
          items:
            $ref: '#/components/schemas/SemanticModelObject'
          example: []
        stream:
          type: boolean
          description: Whether to stream the response or not
          default: false
          example: true
        operation:
          type: string
          enum:
          - sql_generation
          - answer_generation
          description: Whether to response with SQL or natural language. One of 'sql_generation' or 'answer_generation'
          default: sql_generation
          example: sql_generation
        warehouse:
          type: string
          description: Warehouse name to use for result set handling. Only used when 'operation' is 'answer_generation'
          example: example_value
        messages:
          type: array
          items:
            $ref: '#/components/schemas/MessageObject'
          example: []
        source:
          type: string
          description: an optional field to specify the source of the request. e.g "eval", "prod"
          example: example_value
        experimental:
          type: string
          description: JSON serialized string of experimental API fields (undocumented).
          example: example_value
      required:
      - messages
    VerifiedQuerySuggestion:
      type: object
      description: A suggestion to add or remove or replace a Verified Query to a semantic model.
      properties:
        score:
          type: number
          description: Score of the suggestion, higher is better.
          format: float
          example: 42.5
        vq_to_add:
          $ref: '#/components/schemas/VerifiedQuery'
        vq_to_remove:
          $ref: '#/components/schemas/VerifiedQuery'
    MessageObject:
      type: object
      title: The message object
      description: Represents a message within a chat.
      properties:
        role:
          description: The entity that produced the message. One of `user` or `analyst`.
          type: string
          enum:
          - user
          - analyst
          example: user
        content:
          description: The content of the message in array of text or SQL.
          type: array
          items:
            $ref: '#/components/schemas/MessageContent'
          example: []
      required:
      - content
    SendMessageResponse:
      type: object
      description: The non-streaming response object for the sendMessage
      properties:
        message:
          $ref: '#/components/schemas/MessageObject'
        request_id:
          type: string
          description: Unique request ID
          example: '500123'
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/Warning'
          example: []
        semantic_model_selection:
          $ref: '#/components/schemas/SemanticModelSelection'
        response_metadata:
          type: object
          additionalProperties: true
          example: example_value
      required:
      - message
    TokenInfo_2:
      type: object
      properties:
        token:
          type: string
        expiration_seconds:
          type: integer
    SemanticModelChangeOperation:
      type: string
      description: Operation applied to a semantic object at a given path
      enum:
      - set
      - append
      - remove
    AgenticOptimizationStatus:
      type: string
      description: The status of an agentic optimization run.
      enum:
      - IN_PROGRESS
      - COMPLETED
      - FAILED
      - CANCELED
    GenerateFiltersAndMetricsSuggestionsRequest:
      type: object
      description: The request object for generating filters, facts, and metrics suggestions
      properties:
        semantic_model:
          $ref: common-cortex-analyst.yaml#/components/schemas/SemanticModelObject
        tables:
          type: array
          description: Tables and selected columns to build a basic semantic model from
          items:
            $ref: '#/components/schemas/TableColumns'
        warehouse:
          type: string
          description: Warehouse name to use for processing suggestions.
        metrics_offset:
          type: integer
          format: int32
          description: Pagination offset for metrics suggestions
        metrics_limit:
          type: integer
          format: int32
          description: Pagination limit for metrics suggestions
        facts_offset:
          type: integer
          format: int32
          description: Pagination offset for facts suggestions
        facts_limit:
          type: integer
          format: int32
          description: Pagination limit for facts suggestions
        filters_offset:
          type: integer
          format: int32
          description: Pagination offset for filters suggestions
        filters_limit:
          type: integer
          format: int32
          description: Pagination limit for filters suggestions
        experimental:
          type: string
          description: JSON serialized string of experimental API fields (undocumented).
    TableauInput:
      type: object
      description: Input required to extract data from Tableau. Tableau Cloud users can optionally provide integration data if files are not already uploaded
      properties:
        stage_files:
          $ref: '#/components/schemas/TableauStageFiles'
        server_files:
          $ref: '#/components/schemas/TableauServerFiles'
    TdsInput:
      type: object
      description: Tableau data source file stage paths
      properties:
        tds_stage_path:
          type: string
          description: TDS file stage path
        tds_file_content:
          type: string
          description: TDS file raw contents
      required:
      - tds_stage_path
    FastGenerationRequest:
      type: object
      description: The request for the FastGeneration rpc
      properties:
        json_proto:
          type: object
          description: A JSON-mapped FastGenerationRequest protobuf
          additionalProperties: true
    ListAgenticOptimizationsResponse:
      type: object
      description: The response from listing agentic optimization runs.
      properties:
        request_id:
          type: string
          description: Unique request ID
          example: abcd1234-5678-90ab-cdef-1234567890ab
        optimizations:
          type: array
          items:
            $ref: '#/components/schemas/AgenticOptimizationSummary'
    StagingData:
      type: object
      description: Contains information indicating where to stage data
      properties:
        database:
          type: string
          description: Database name
        schema:
          type: string
          description: Schema name
      required:
      - database
      - schema
    AnnotatedSqlQuery:
      type: object
      description: Contains a SQL query with optional context and natural language annotation
      properties:
        sql_text:
          type: string
          description: SQL query text
        database:
          type: string
          description: Database associated with the SQL query
        schema:
          type: string
          description: Schema associated with the SQL query
        corresponding_question:
          type: string
          description: Natural language question that the SQL query answers
        additional_context:
          type: string
          description: Free-form string for additional context about the query
      required:
      - sql_text
    TableauIntegration:
      type: object
      description: Contains data on how to connect to Tableau and process data
      properties:
        auth:
          $ref: '#/components/schemas/TableauAuth'
        staging_data:
          $ref: '#/components/schemas/StagingData'
      required:
      - auth
      - staging_data
    AgenticOptimizationSummary:
      type: object
      description: A summary of an agentic optimization run.
      properties:
        optimization_name:
          type: string
          description: The fully-qualified name of the optimization.
        status:
          $ref: '#/components/schemas/AgenticOptimizationStatus'
    GetAgenticOptimizationResponse:
      type: object
      description: The status, state, and outcome of a specified agen

# --- truncated at 32 KB (42 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/openapi/snowflake-cortex-analyst-api-openapi.yml