Create Query
curl --request POST \
--url https://api.hypermodel.ai/api/v1/query \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <x-api-key>' \
--data '
{
"query": "<string>",
"schema": {},
"destination": {
"type": "<string>",
"config": {}
},
"columns": [
{}
],
"async": true,
"accuracyMode": "<string>"
}
'import requests
url = "https://api.hypermodel.ai/api/v1/query"
payload = {
"query": "<string>",
"schema": {},
"destination": {
"type": "<string>",
"config": {}
},
"columns": [{}],
"async": True,
"accuracyMode": "<string>"
}
headers = {
"X-API-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
schema: {},
destination: {type: '<string>', config: {}},
columns: [{}],
async: true,
accuracyMode: '<string>'
})
};
fetch('https://api.hypermodel.ai/api/v1/query', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hypermodel.ai/api/v1/query",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => '<string>',
'schema' => [
],
'destination' => [
'type' => '<string>',
'config' => [
]
],
'columns' => [
[
]
],
'async' => true,
'accuracyMode' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hypermodel.ai/api/v1/query"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"schema\": {},\n \"destination\": {\n \"type\": \"<string>\",\n \"config\": {}\n },\n \"columns\": [\n {}\n ],\n \"async\": true,\n \"accuracyMode\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hypermodel.ai/api/v1/query")
.header("X-API-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"schema\": {},\n \"destination\": {\n \"type\": \"<string>\",\n \"config\": {}\n },\n \"columns\": [\n {}\n ],\n \"async\": true,\n \"accuracyMode\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hypermodel.ai/api/v1/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"schema\": {},\n \"destination\": {\n \"type\": \"<string>\",\n \"config\": {}\n },\n \"columns\": [\n {}\n ],\n \"async\": true,\n \"accuracyMode\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyAPI Reference
Create Query
Submit a new query for processing. Supports both synchronous and asynchronous modes.
POST
/
api
/
v1
/
query
Create Query
curl --request POST \
--url https://api.hypermodel.ai/api/v1/query \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <x-api-key>' \
--data '
{
"query": "<string>",
"schema": {},
"destination": {
"type": "<string>",
"config": {}
},
"columns": [
{}
],
"async": true,
"accuracyMode": "<string>"
}
'import requests
url = "https://api.hypermodel.ai/api/v1/query"
payload = {
"query": "<string>",
"schema": {},
"destination": {
"type": "<string>",
"config": {}
},
"columns": [{}],
"async": True,
"accuracyMode": "<string>"
}
headers = {
"X-API-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
schema: {},
destination: {type: '<string>', config: {}},
columns: [{}],
async: true,
accuracyMode: '<string>'
})
};
fetch('https://api.hypermodel.ai/api/v1/query', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hypermodel.ai/api/v1/query",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => '<string>',
'schema' => [
],
'destination' => [
'type' => '<string>',
'config' => [
]
],
'columns' => [
[
]
],
'async' => true,
'accuracyMode' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hypermodel.ai/api/v1/query"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"schema\": {},\n \"destination\": {\n \"type\": \"<string>\",\n \"config\": {}\n },\n \"columns\": [\n {}\n ],\n \"async\": true,\n \"accuracyMode\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hypermodel.ai/api/v1/query")
.header("X-API-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"schema\": {},\n \"destination\": {\n \"type\": \"<string>\",\n \"config\": {}\n },\n \"columns\": [\n {}\n ],\n \"async\": true,\n \"accuracyMode\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hypermodel.ai/api/v1/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"schema\": {},\n \"destination\": {\n \"type\": \"<string>\",\n \"config\": {}\n },\n \"columns\": [\n {}\n ],\n \"async\": true,\n \"accuracyMode\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyAuthentication
string
required
Your API key for authentication
string
default:"application/json"
Content type header
Body Parameters
string
required
Natural language query describing the data you want
object
required
JSON Schema defining the structure of the response data
object
array
Optional list of specific columns to include
boolean
default:"false"
If true, process asynchronously and send to destination
string
default:"low"
Accuracy mode:
low or highAccuracy Modes
- Low Accuracy (Default)
- High Accuracy
Uses Hypermodel search first, falls back to web search only if data is not found.Characteristics:
- ⚡ Faster processing
- 💰 Lower cost
- 📊 Good for well-indexed company data
{
"accuracyMode": "low"
}
Uses both Hypermodel and web search in parallel using subagents.Characteristics:
- 🎯 More comprehensive results
- ✅ Higher accuracy
- ⏱️ Slower processing and higher cost
{
"accuracyMode": "high"
}
⌘I
