Liquid AI's d1.2 and d1.2-ultra are now available on AI Gateway
Liquid AI’s decision models d1.2 and d1.2-ultra are now accessible via AI Gateway, supporting audio input and bounding box analysis for structured responses.
Liquid AI’s d1.2 and d1.2-ultra decision models are now available on AI Gateway, enabling users to receive structured answers instead of generated text. These models support Boolean, Choice, and Score question types, allowing for yes/no probabilities, category selection, or rubric-based ratings. Multiple questions can reference the same input within a single request, improving efficiency for batch processing.
The d1.2 model is positioned as the faster and lower-cost option, while d1.2-ultra is Liquid AI’s most accurate decision model. Users must specify the model name as liquid/d1.2 or liquid/d1.2-ultra when making API calls. An AI Gateway API key is required and must be set as the AI_GATEWAY_API_KEY environment variable before executing examples.
Audio input is supported through file uploads in the request state, with an example provided for analyzing a voicemail in FLAC format to determine the probability of a refund request. The Decisions API requires ai version 7.0.136 or later to process audio inputs. Image classification is handled by passing image bytes with the correct media type, such as image/png.
Bounding box support allows for spatial analysis of images, returning coordinates as fractions of image dimensions. A Python example demonstrates locating a signature in a PNG file and printing its bounding box coordinates. Decision requests are logged in AI Gateway and count toward usage budgets, ensuring transparency in resource consumption.