Overview

@qverisai/sdk


TypeScript SDK API reference

This page is generated from the public package exports and source comments. See the TypeScript SDK guide for installation, authentication, and complete workflows.

Classes#

ApiKeyCredentialProvider#

A credential provider backed by a static QVeris API key.

Implements#

Constructors#

Constructor#

new ApiKeyCredentialProvider(apiKey): ApiKeyCredentialProvider

Parameters#
apiKey#

string

Returns#

ApiKeyCredentialProvider

Methods#

getCredential()#

getCredential(_context): Promise<string>

Parameters#
_context#

CredentialContext

Returns#

Promise<string>

Implementation of#

CredentialProvider.getCredential


Qveris#

QVeris API client.

Example#

import { Qveris } from '@qverisai/sdk';
 
const qveris = new Qveris({ apiKey: process.env.QVERIS_API_KEY! });
 
const found = await qveris.discover('stock price market data API', { limit: 5 });
const tool = found.results[0];
 
const outcome = await qveris.call(tool.tool_id, {
  searchId: found.search_id,
  parameters: { symbol: 'AAPL' },
});

Constructors#

Constructor#

new Qveris(config): Qveris

Parameters#
config#

QverisClientOptions

Returns#

Qveris

Accessors#

rateLimitRetryCount#
Get Signature#

get rateLimitRetryCount(): number

How many times the client has backed off on a rate-limited (429) / transient (503) response so far. Rate-limit backoff is retried pressure, not failure — observe this rather than counting the retried responses.

Returns#

number

Methods#

call()#

call(toolId, options): Promise<ExecuteResponse>

Call a capability. The response may include pre-settlement billing; final charges are reflected in usage() and ledger().

Parameters#
toolId#

string

options#

CallOptions

Returns#

Promise<ExecuteResponse>

credits()#

credits(): Promise<CreditsResponse>

Get current credit balance and bucket details.

Returns#

Promise<CreditsResponse>

discover()#

discover(query, options?): Promise<SearchResponse>

Discover capabilities from a natural-language query. Free.

Parameters#
query#

string

options?#

DiscoverOptions = {}

Returns#

Promise<SearchResponse>

inspect()#

inspect(toolIds, options?): Promise<SearchResponse>

Inspect capabilities by id to get current parameter schemas. Free. An empty id list resolves locally without a network request.

Parameters#
toolIds#

string | string[]

options?#

InspectOptions = {}

Returns#

Promise<SearchResponse>

ledger()#

ledger(filters?): Promise<CreditsLedgerResponse>

Query final credits ledger entries.

Parameters#
filters?#

CreditsLedgerRequest = {}

Returns#

Promise<CreditsLedgerResponse>

probe()#

probe(toolId, options?): Promise<ProbeResponse>

Validate candidate parameters and request a zero-cost quote without executing the capability.

Parameters#
toolId#

string

options?#

ProbeOptions = {}

Returns#

Promise<ProbeResponse>

usage()#

usage(filters?): Promise<UsageEventsResponse>

Query request-level usage audit history.

Parameters#
filters?#

UsageHistoryRequest = {}

Returns#

Promise<UsageEventsResponse>

fromEnv()#

static fromEnv(overrides?): Qveris

Create a client from the QVERIS_API_KEY environment variable. An explicit baseUrl override takes priority over QVERIS_BASE_URL.

Parameters#
overrides?#

Omit<QverisClientOptions, "apiKey" | "credentialProvider">

Returns#

Qveris


QverisApiError#

Error thrown for any failed QVeris API interaction: HTTP errors, failure envelopes, timeouts, and network failures.

Carries the same shape as the wire-level ApiError so callers can branch on status and inspect observability for diagnostics.

Extends#

  • Error

Implements#

Constructors#

Constructor#

new QverisApiError(error): QverisApiError

Parameters#
error#

ApiError

Returns#

QverisApiError

Overrides#

Error.constructor

Properties#

cause?#

readonly optional cause?: string

Lower-level transport or runtime cause when available

Implementation of#

ApiError.cause

Overrides#

Error.cause

details?#

readonly optional details?: unknown

Original error details if available

Implementation of#

ApiError.details

message#

message: string

Error message

Implementation of#

ApiError.message

Inherited from#

Error.message

name#

name: string

Inherited from#

Error.name

observability?#

readonly optional observability?: ApiObservability

Request metadata for diagnosing API failures

Implementation of#

ApiError.observability

stack?#

optional stack?: string

Inherited from#

Error.stack

status#

readonly status: number

HTTP status code (0 for network errors, 408 for timeouts)

Implementation of#

ApiError.status

stackTraceLimit#

static stackTraceLimit: number

The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.

If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

Inherited from#

Error.stackTraceLimit

Methods#

captureStackTrace()#

static captureStackTrace(targetObject, constructorOpt?): void

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

function a() {
  b();
}
 
function b() {
  c();
}
 
function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;
 
  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}
 
a();
Parameters#
targetObject#

object

constructorOpt?#

Function

Returns#

void

Inherited from#

Error.captureStackTrace

prepareStackTrace()#

static prepareStackTrace(err, stackTraces): any

Parameters#
err#

Error

stackTraces#

CallSite[]

Returns#

any

See#

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from#

Error.prepareStackTrace

Interfaces#

ApiEnvelope#

Type Parameters#

T#

T

Properties#

data#

data: T

message?#

optional message?: string

status#

status: string

status_code?#

optional status_code?: number


ApiError#

Properties#

cause?#

optional cause?: string

Lower-level transport or runtime cause when available.

details?#

optional details?: unknown

Original error details if available

message#

message: string

Error message

observability?#

optional observability?: ApiObservability

Request metadata for diagnosing API/provider/tool-chain failures.

status#

status: number

HTTP status code


ApiObservability#

Properties#

endpoint#

endpoint: string

error_type?#

optional error_type?: ApiErrorType

http_status?#

optional http_status?: number

method#

method: "GET" | "POST"

operation#

operation: ApiOperation

query_params?#

optional query_params?: Record<string, string>

request_id?#

optional request_id?: string

source#

source: "qveris_api"

timeout_ms#

timeout_ms: number

url#

url: string


BillingChargeLine#

Properties#

amount_credits?#

optional amount_credits?: number | null

component_key#

component_key: string

description?#

optional description?: string | null

is_adjustment?#

optional is_adjustment?: boolean | null

price?#

optional price?: BillingPrice | null

quantity?#

optional quantity?: number | null

unit?#

optional unit?: string | null

unit_label?#

optional unit_label?: string | null


BillingPrice#

Properties#

amount_credits#

amount_credits: number

per?#

optional per?: number | null

unit?#

optional unit?: string | null

unit_label?#

optional unit_label?: string | null


BillingRule#

Properties#

billing_unit?#

optional billing_unit?: string

billing_unit_label?#

optional billing_unit_label?: string

description?#

optional description?: string

metering_mode?#

optional metering_mode?: string

minimum_charge_credits?#

optional minimum_charge_credits?: number | null

price?#

optional price?: BillingPrice | null

price_breakdown?#

optional price_breakdown?: Record<string, unknown>[] | null

pricing_dimensions?#

optional pricing_dimensions?: Record<string, unknown>[] | null

pricing_source_system?#

optional pricing_source_system?: string | null

runtime_pricing_version?#

optional runtime_pricing_version?: string | null

snapshot_id?#

optional snapshot_id?: number | null

snapshot_version?#

optional snapshot_version?: string | null


CallOptions#

Options for Qveris.call.

Properties#

maxResponseSize?#

optional maxResponseSize?: number

Max response bytes before truncation (-1 for no limit, server default 20480)

parameters#

parameters: Record<string, unknown>

Key-value parameters matching the tool's parameter schema

respondWith?#

optional respondWith?: "full" | `fields:${string}` | "summary"

Server-side result projection. Omit for the legacy/full response.

searchId?#

optional searchId?: string

The search_id from the discover call that returned this tool

sessionId?#

optional sessionId?: string

Session identifier for tracking

timeoutMs?#

optional timeoutMs?: number

Per-request timeout override in milliseconds (default 120s)


CompactBillingStatement#

Properties#

charge_lines?#

optional charge_lines?: BillingChargeLine[] | null

list_amount_credits?#

optional list_amount_credits?: number | null

minimum_charge_credits?#

optional minimum_charge_credits?: number | null

price?#

optional price?: BillingPrice | null

quantity?#

optional quantity?: number | null

requested_amount_credits?#

optional requested_amount_credits?: number | null

summary?#

optional summary?: string | null


CredentialContext#

Context supplied whenever the client requests a credential.

Properties#

resource#

resource: string

API resource the credential will be sent to.

scopes#

scopes: readonly string[]

Requested authorization scopes. Empty until a public scope contract is available.


CredentialProvider#

Supplies a bearer credential for an API request.

Methods#

getCredential()#

getCredential(context): string | Promise<string>

Parameters#
context#

CredentialContext

Returns#

string | Promise<string>


CreditsLedgerItem#

Properties#

amount_credits#

amount_credits: number

balance_after?#

optional balance_after?: Record<string, unknown> | null

balance_before?#

optional balance_before?: Record<string, unknown> | null

created_at#

created_at: string

description?#

optional description?: string | null

entry_type#

entry_type: string

id#

id: string

ledger_metadata?#

optional ledger_metadata?: Record<string, unknown> | null

pre_settlement_bill?#

optional pre_settlement_bill?: Record<string, unknown> | null

settlement_result?#

optional settlement_result?: Record<string, unknown> | null

source_ref_id?#

optional source_ref_id?: string | null

source_ref_type?#

optional source_ref_type?: string | null

source_system#

source_system: string


CreditsLedgerRequest#

Properties#

bucket?#

optional bucket?: string

direction?#

optional direction?: string

end_date?#

optional end_date?: string

entry_type?#

optional entry_type?: string

limit?#

optional limit?: number

max_credits?#

optional max_credits?: number

min_credits?#

optional min_credits?: number

page?#

optional page?: number

page_size?#

optional page_size?: number

start_date?#

optional start_date?: string

summary?#

optional summary?: boolean


CreditsLedgerResponse#

Properties#

items#

items: CreditsLedgerItem[]

page#

page: number

page_size#

page_size: number

summary?#

optional summary?: Record<string, unknown> | null

total#

total: number


CreditsResponse#

Properties#

daily_free?#

optional daily_free?: Record<string, unknown>

invite_reward?#

optional invite_reward?: Record<string, unknown>

purchased?#

optional purchased?: Record<string, unknown>

remaining_credits#

remaining_credits: number

welcome_bonus?#

optional welcome_bonus?: Record<string, unknown>


DiscoverOptions#

Options for Qveris.discover.

Properties#

lang?#

optional lang?: "zh" | "en"

Response language. Omit to use server-side language negotiation.

limit?#

optional limit?: number

Maximum number of results (1-100, server default 20)

sessionId?#

optional sessionId?: string

Session identifier for tracking

timeoutMs?#

optional timeoutMs?: number

Per-request timeout override in milliseconds

view?#

optional view?: "routing" | "full"

Response projection. Omit for the legacy/full response shape.


ExecuteRequest#

Request body for the Execute Tool API.

Properties#

max_response_size?#

optional max_response_size?: number

Maximum size of response data in bytes. If the tool generates data longer than this, it will be truncated and a download URL will be provided for the full content. Minimum: -1 (-1 means no limit).

Default#
20480 (20KB)
parameters#

parameters: Record<string, unknown>

Key-value pairs of parameters to pass to the tool. Must match the parameter schema from the tool's definition.

respond_with?#

optional respond_with?: "full" | `fields:${string}` | "summary"

Server-side result projection. Omit for the legacy/full response.

search_id#

search_id: string

The search_id from the search that returned this tool. Links the execution to the original search for analytics and billing.

session_id?#

optional session_id?: string

Session identifier for tracking user sessions.


ExecuteResponse#

Response from the Execute Tool API.

Properties#

billing?#

optional billing?: CompactBillingStatement

Structured pre-settlement billing statement when available

cost?#

optional cost?: number

Legacy fallback estimate; use usage audit or credits ledger for final charge

created_at?#

optional created_at?: string

Timestamp of execution (ISO 8601 format)

elapsed_time_ms?#

optional elapsed_time_ms?: number

Execution duration in milliseconds (alternative field)

error_message?#

optional error_message?: string | null

Error message if execution failed. Common reasons: insufficient balance, quota exceeded, invalid parameters.

execution_id#

execution_id: string

Unique identifier for this execution record

execution_time?#

optional execution_time?: number

Execution duration in seconds

parameters?#

optional parameters?: Record<string, unknown>

The parameters that were passed to the tool

pre_settlement_bill?#

optional pre_settlement_bill?: Record<string, unknown>

Legacy/full pre-settlement bill snapshot when returned directly

remaining_credits?#

optional remaining_credits?: number

User's remaining credits after this execution

result?#

optional result?: ExecuteResult

The execution result. Contains either data (if within size limit) or truncation info.

success#

success: boolean

Whether the execution completed successfully

tool_id?#

optional tool_id?: string

The tool that was executed


ExecuteResultData#

Result data when the response fits within max_response_size.

Properties#

data#

data: unknown

The actual result data from the tool execution


ExecuteResultFields#

Selected result fields returned by a fields:<JSONPath,...> projection.

Properties#

data?#

optional data?: unknown

respond_with#

respond_with: `fields:${string}`


ExecuteResultSummary#

Compact result returned by respond_with: "summary".

Properties#

content_schema?#

optional content_schema?: Record<string, unknown>

full_content_file_url?#

optional full_content_file_url?: string

message?#

optional message?: string

respond_with#

respond_with: "summary"

summary?#

optional summary?: object

Index Signature#

[key: string]: unknown

fields?#

optional fields?: string[]

row_count?#

optional row_count?: number

size_bytes?#

optional size_bytes?: number


ExecuteResultTruncated#

Result data when the response exceeds max_response_size. Provides truncated content and a URL to download the full result.

Properties#

content_schema?#

optional content_schema?: Record<string, unknown>

JSON Schema describing the structure of the full content. Helps the agent understand the data shape without downloading.

full_content_file_url#

full_content_file_url: string

URL to download the complete result file. Valid for 120 minutes.

message#

message: string

Explanation message about the truncation

truncated_content#

truncated_content: string

The initial portion of the response (max_response_size bytes). Useful for previewing the data structure.


GetToolsByIdsRequest#

Request body for the Get Tools by IDs API.

Properties#

search_id?#

optional search_id?: string

The search_id from the search that returned the tool(s).

session_id?#

optional session_id?: string

Session identifier for tracking user sessions.

tool_ids#

tool_ids: string[]

Array of tool IDs to retrieve information for.


InspectOptions#

Options for Qveris.inspect.

Properties#

searchId?#

optional searchId?: string

The search_id from the discover call that returned the tool(s)

sessionId?#

optional sessionId?: string

Session identifier for tracking

timeoutMs?#

optional timeoutMs?: number

Per-request timeout override in milliseconds


ProbeOptions#

Options for Qveris.probe.

Properties#

checks?#

optional checks?: ProbeCheck[]

Checks to run. Defaults to schema.

liveBudget?#

optional liveBudget?: ProbeLiveBudget

Probe budget. Every current value avoids capability execution.

parameters?#

optional parameters?: Record<string, unknown>

Candidate parameters to validate without executing the capability.

timeoutMs?#

optional timeoutMs?: number

Per-request timeout override in milliseconds.


ProbeQuoteResult#

Properties#

basis?#

optional basis?: string | null

currency#

currency: "credits"

detail?#

optional detail?: Record<string, unknown> | null

estimate_credits?#

optional estimate_credits?: number | null

exact#

exact: boolean


ProbeRequest#

Properties#

checks?#

optional checks?: ProbeCheck[]

live_budget?#

optional live_budget?: ProbeLiveBudget

parameters?#

optional parameters?: Record<string, unknown>


ProbeResponse#

Properties#

coverage?#

optional coverage?: ProbeUnknownResult

quote?#

optional quote?: ProbeQuoteResult

sample?#

optional sample?: ProbeUnknownResult

schema?#

optional schema?: ProbeSchemaResult


ProbeSchemaResult#

Properties#

note?#

optional note?: string | null

valid#

valid: boolean

violations?#

optional violations?: ProbeSchemaViolation[] | null


ProbeSchemaViolation#

Properties#

message#

message: string

param?#

optional param?: string | null

type#

type: string


ProbeUnknownResult#

Properties#

reason#

reason: string

verdict#

verdict: "unknown"


QverisClientConfig#

Configuration options for the Qveris API client.

Properties#

apiKey#

apiKey: string

API authentication token

baseUrl?#

optional baseUrl?: string

API base URL. Overrides QVERIS_BASE_URL and the built-in default.

maxRetries?#

optional maxRetries?: number

Max automatic retries for rate-limited (429) / transient (503) responses. Honors Retry-After, otherwise backs off exponentially with jitter. Defaults to 3; set to 0 to disable.

timeoutMs?#

optional timeoutMs?: number

Default request timeout in milliseconds


SearchRequest#

Request body for the Search Tools API.

Properties#

lang?#

optional lang?: "zh" | "en"

Response language. Omit to use server-side language negotiation.

limit?#

optional limit?: number

Maximum number of results to return. Minimum: 1. Maximum: 100.

Default#
20
query#

query: string

Natural language search query describing the tool capability you need.

session_id?#

optional session_id?: string

Session identifier for tracking user sessions.

view?#

optional view?: "routing" | "full"

Response projection. Omit for the legacy/full response shape.


SearchResponse#

Response from the Search Tools API.

Properties#

elapsed_time_ms?#

optional elapsed_time_ms?: number

Total elapsed time in milliseconds

query?#

optional query?: string

The original search query

remaining_credits?#

optional remaining_credits?: number

User's remaining credits after this operation

results#

results: ToolInfo[]

Array of matching tools

search_id#

search_id: string

Unique identifier for this search. Required when calling call for any tool from these results.

stats?#

optional stats?: SearchStats

Search performance statistics

total?#

optional total?: number

Total number of results returned


SearchStats#

Performance statistics for a search operation.

Properties#

fulltext_recall_count?#

optional fulltext_recall_count?: number

Fulltext recall count

search_time_ms?#

optional search_time_ms?: number

Total time to complete the search in milliseconds

vector_recall_count?#

optional vector_recall_count?: number

Vector recall count


ToolCapability#

Standardized capability descriptor attached to a tool (e.g. "MKT.BARS.ADJUSTED" with market coverage tags).

Properties#

id?#

optional id?: string

tag?#

optional tag?: ToolCapabilityTag[]


ToolCapabilityTag#

Coverage tag attached to a capability (e.g. market coverage).

Properties#

description?#

optional description?: string

id?#

optional id?: string

name?#

optional name?: string

type?#

optional type?: string


ToolCategory#

Category/tag attached to a tool. Current API responses return category objects; legacy responses returned plain strings, so ToolInfo.categories accepts both.

Properties#

description?#

optional description?: string

name?#

optional name?: string

slug?#

optional slug?: string


ToolExamples#

Example usage for a tool, showing sample parameters.

Properties#

sample_parameters?#

optional sample_parameters?: Record<string, unknown>

Sample parameter values demonstrating typical usage


ToolInfo#

Information about a tool returned from search results. Contains everything needed to understand and execute the tool.

Properties#

as_of_support?#

optional as_of_support?: boolean

Whether the capability supports point-in-time requests.

billing_rule?#

optional billing_rule?: BillingRule

Structured rule-level billing metadata when available

capabilities?#

optional capabilities?: ToolCapability[]

Standardized capability descriptors with coverage tags

capability?#

optional capability?: string

Compact capability label returned by the routing projection.

categories?#

optional categories?: (string | ToolCategory)[]

Tool categories/tags: category objects, or plain strings in legacy responses

cost_class?#

optional cost_class?: string

Compact cost class returned by the routing projection.

description?#

optional description?: string

Detailed description of what the tool does

docs_url?#

optional docs_url?: string

Documentation URL for the tool

examples?#

optional examples?: ToolExamples

Usage examples with sample parameters

expected_cost?#

optional expected_cost?: string | number

Pre-call cost estimate in credits, when available

final_score?#

optional final_score?: number

Relevance score for the search query (0.0 - 1.0, higher = better match)

has_last_execution?#

optional has_last_execution?: boolean

Whether this tool has been executed before (verified in production)

last_execution_record?#

optional last_execution_record?: Record<string, unknown>

Most recent execution record, if available

name?#

optional name?: string

Human-readable display name

params?#

optional params?: ToolParameter[]

List of parameters the tool accepts

protocol?#

optional protocol?: string

Protocol type

provider_description?#

optional provider_description?: string

Description of the provider

provider_id?#

optional provider_id?: string

Provider identifier

provider_name?#

optional provider_name?: string

Name of the organization/service providing this tool

provider_website_url?#

optional provider_website_url?: string

Provider website URL

region?#

optional region?: string

Geographic availability of the tool.

  • "global" - Available worldwide
  • "US|CA" - Whitelist: only available in US and Canada
  • "-CN|RU" - Blacklist: not available in China and Russia
reliability?#

optional reliability?: string

Compact reliability grade returned by the routing projection.

stats?#

optional stats?: ToolStats

Historical execution performance statistics

tool_id#

tool_id: string

Unique identifier for the tool (used in call)

optional why_recommended?: string

Human-readable explanation of why this tool was recommended (Discover results only)


ToolParameter#

Parameter definition for a tool.

Properties#

description#

description: string

Human-readable description of what this parameter does

enum?#

optional enum?: string[]

If present, restricts valid values to this list

name#

name: string

Parameter name (used as key in the parameters object)

required#

required: boolean

Whether this parameter must be provided

type#

type: "string" | "number" | "boolean" | "object" | "array"

Data type of the parameter


ToolStats#

Historical execution performance statistics for a tool.

Properties#

avg_execution_time_ms?#

optional avg_execution_time_ms?: number

Historical average execution time in milliseconds

cost?#

optional cost?: number

Legacy fallback estimate in credits per call

success_rate?#

optional success_rate?: number

Historical success rate (0.0 - 1.0)


UsageEventItem#

Properties#

actual_amount_credits?#

optional actual_amount_credits?: number | null

billing_snapshot_status?#

optional billing_snapshot_status?: string | null

billing_summary?#

optional billing_summary?: string | null

charge_outcome?#

optional charge_outcome?: string | null

created_at#

created_at: string

credits_ledger_entry_id?#

optional credits_ledger_entry_id?: string | null

display_target?#

optional display_target?: string | null

error_message?#

optional error_message?: string | null

event_type#

event_type: string

execution_id?#

optional execution_id?: string | null

id#

id: string

kind?#

optional kind?: string | null

model?#

optional model?: string | null

pre_settlement_amount_credits?#

optional pre_settlement_amount_credits?: number | null

pre_settlement_bill?#

optional pre_settlement_bill?: Record<string, unknown> | null

query?#

optional query?: string | null

requested_amount_credits?#

optional requested_amount_credits?: number | null

search_id?#

optional search_id?: string | null

session_id?#

optional session_id?: string | null

settled_amount_credits?#

optional settled_amount_credits?: number | null

settlement_result?#

optional settlement_result?: Record<string, unknown> | null

source_ref_id?#

optional source_ref_id?: string | null

source_ref_type?#

optional source_ref_type?: string | null

source_system#

source_system: string

success#

success: boolean

tool_id?#

optional tool_id?: string | null


UsageEventsResponse#

Properties#

items#

items: UsageEventItem[]

page#

page: number

page_size#

page_size: number

summary?#

optional summary?: Record<string, unknown> | null

total#

total: number


UsageHistoryRequest#

Properties#

bucket?#

optional bucket?: string

charge_outcome?#

optional charge_outcome?: string

end_date?#

optional end_date?: string

event_type?#

optional event_type?: string

execution_id?#

optional execution_id?: string

kind?#

optional kind?: string

limit?#

optional limit?: number

max_credits?#

optional max_credits?: number

min_credits?#

optional min_credits?: number

page?#

optional page?: number

page_size?#

optional page_size?: number

search_id?#

optional search_id?: string

start_date?#

optional start_date?: string

success?#

optional success?: boolean

summary?#

optional summary?: boolean

Type Aliases#

ApiErrorType#

ApiErrorType = "http_error" | "invalid_json" | "timeout" | "network_error"


ApiOperation#

ApiOperation = "discover" | "inspect" | "probe" | "call" | "credits" | "usage_history" | "credits_ledger"

Error response from the Qveris API.


ExecuteResult#

ExecuteResult = ExecuteResultData | ExecuteResultTruncated | ExecuteResultSummary | ExecuteResultFields | unknown[] | string | number | boolean | null

Union type for execution results (either full data or truncated).


ProbeCheck#

ProbeCheck = "schema" | "quote" | "coverage" | "sample"


ProbeLiveBudget#

ProbeLiveBudget = "none" | "metadata" | "sampled"


QverisClientOptions#

QverisClientOptions = Omit<QverisClientConfig, "apiKey"> & { apiKey: string; credentialProvider?: never; } | { apiKey?: never; credentialProvider: CredentialProvider; }

Configuration accepted by the QVeris REST client.

Functions#

getQverisTools()#

getQverisTools(qveris, options?): object

Build Vercel AI SDK tools for the QVeris discover/inspect/call workflow.

Parameters#

qveris#

Qveris

The Qveris client to route calls through.

options?#

Optional sessionId for correlation/pricing context.

sessionId?#

string

Returns#

object

A tools object keyed by qveris_discover / qveris_inspect / qveris_call, ready to pass to generateText/streamText.

qveris_call#

qveris_call: object & object & object & object & object | never | object & object & object & object & object | never | object & object & object & object & object | never | object & object & object & object & object | never

qveris_discover#

qveris_discover: object & object & object & object & object | never | object & object & object & object & object | never | object & object & object & object & object | never | object & object & object & object & object | never

qveris_inspect#

qveris_inspect: never | object & object & object & object & object | never | object & object & object & object & object | never | object & object & object & object & object | never | object & object & object & object & object