Skip to main content

Overview

Queries are how you get results from OnDeck’s visual reasoning models. They can be synchronous or asynchronous and are either run on an Input or Collection.

Models

OnDeck offers two perception models: If no model is specified, perception-0-fast is used by default.
perception-0-thinking is currently available for video inputs only and requires your organization to be enabled. Reach out to [email protected] for access.

Query Structure

Queries support both free-form natural language queries as well as structured formats. Ask for anything that can be reasonably answered by a human.
Custom queries (such as structured query outputs and input context) are currently only available to fully onboarded customers. Reach out to [email protected] for access.

Synchronous vs Asynchronous vs Background Queries

Synchronous queries are run while blocking the client until a response is available, similar to a chat interface. Requests are blocking and return with query results in the returned Query resource. Asynchronous queries provide the same results as Synchronous queries, but offer a non-blocking interface. Requests return immediately with a Query resource, but with no results yet. Clients can then poll the Query by its id for results. Background queries are run automatically in the background when an Input is uploaded and becomes valid, and results are polled for just like Asynchronous queries. These queries are useful for repetitive use cases.
Background queries are currently only for fully onboarded customers. Reach out to [email protected] to customize background queries and even call them yourself.

Capabilities

  • Traditional computer vision tasks
  • Visual question answering and semantic and temporal understanding
  • Natural language search
  • Open ended moment retrieval and detection
  • Produce structured outputs for reports and systems
  • Multi-step reasoning over long-form video
  • Provide feedback on queries to improve results
Use Collections to query across multiple Inputs at once (perception-0-fast).

Response Times

Access Control

Queries belong to Inputs or Collections in a Project. Any user with access to Inputs or Collections in a Project can create a Query on them, and the Query is accesible to any User in the same Project.

Pagination and Filtering

When listing Queries, the API returns paginated results with support for filtering and sorting.

Deletion

Queries can be deleted without any dependency checks.

Query an Input

Ask natural language questions on Inputs

Get Input Queries

Get all completed queries for a specific input

Query a Collection

Ask natural language questions on a Collection of Inputs

Get Collection Queries

Get all completed queries for a specific Collection

Get Query by ID

Poll for asynchronous query results

Get Background Query

Poll for background query results