Text-to-SQL and Analytics Assistants

Text-to-SQL and Analytics Assistants

Run text-to-SQL and analytics assistants on Hal at $2 / $10 per 1M tokens, with multi-step tool calling. Change the base URL, key and model.

hal-1.0
October 25, 2026
At a glance
Recommended model
Hal
Model ID
hal-1.0
Price per 1M tokens
$2 input / $10 output
Compatibility
OpenAI and Anthropic compatible APIs. Change the base URL, key and model.
Last updated
October 25, 2026

What drives the cost

A text-to-SQL assistant reads a lot and writes a little. Each question sends the model the table definitions, the metric definitions and a few example queries, then the query results, and the model writes back a few hundred tokens of SQL and an answer. Most questions take more than one call, because the model runs a query, reads the result and then answers or fixes the query.

The cost of one call is the input tokens multiplied by the input price, plus the output tokens multiplied by the output price, divided by one million. Hal costs $2 per million input tokens and $10 per million output tokens. Current rates are on the pricing page.

A worked example to replace with your own numbers

An analyst asks a question in plain words. The assistant writes a query, runs it against a read-only replica, reads the result, runs one corrected query and answers.

AssumptionValue
Instructions, table and metric definitions and example queries, sent on every call6,000 tokens
The question and the conversation so far100 tokens
Calls per question, including one correction3
Query results returned to the model, per run1,200 tokens
Input tokens per question, across the three calls22,700
Output tokens per question, two queries and the answer850
Cost per question on Hal$0.054
Cost per question on Clarke$0.021

A company where 60 people each ask 10 questions a working day asks about 12,600 questions a month. That comes to about $685 a month on Hal and $263 on Clarke before prompt caching. Sending each question first to Tycho to decide whether it needs SQL at all costs about $0.00013 a question.

The schema and instructions are 79 percent of the input, and input is 84 percent of the cost on Hal. They are identical on every call, so prompt caching applies to them, and Radium's model pages put the saving on repeated prompts at up to 90 percent. Sending only the tables a question needs cuts the input further.

Count the tokens in your own schema and a sample of your own results before you plan around these numbers.

Which model to use

Hal is the default for text-to-SQL. Radium built it for complex reasoning and multi-step agents and positions it as Opus-class. Writing SQL against a real schema means picking the right joins, applying the right metric definition and noticing when a result looks wrong, and a query that runs but answers a different question returns a confident wrong number. Volume is low compared with customer-facing work, so the gap between Hal and Clarke in the example above is about $423 a month for 60 people.

Clarke handles the simpler half. Use it for lookups against a single table, for explaining a result in plain words and for questions about a schema too large for Hal's context window of 128,000 tokens, because Clarke's window is 200,000. Many teams start on Clarke and send questions that fail validation or need several joins to Hal.

Tycho does the work around the question. Use it to decide whether a question needs SQL, an existing dashboard or a person, to pick the tables a question is likely to need and to title the conversation. Radium's tool calling guide marks multi-step tool loops on Tycho as limited, so keep it out of the query loop.

StepModelModel ID
Writing, running and fixing queries, multi-table questionsHalhal-1.0
Single-table lookups, explaining results, very large schemasClarkeclarke-1.0
Routing questions, picking likely tables, conversation titlesTychotycho-1.0

Let the validation checks decide which questions move between Hal and Clarke.

What this workload needs from the API

A text-to-SQL assistant depends on tool calling more than most workloads. Confirm each row against your own client and your own warehouse before people start relying on the answers.

CapabilityWhy text-to-SQL needs itOn Radium
Tool callingRunning a query, reading the result and running a corrected one in the same answerParallel calls and strict schema validation on all three models. Multi-step loops on Hal and Clarke
Structured outputReturning the query, the assumptions and the answer as fields your app can show and logJSON mode and JSON schema on all three models
Context windowHolding the table definitions, metric definitions and resultsClarke 200,000 tokens, Hal 128,000, Tycho 128,000
StreamingShowing the explanation as it is writtenSupported on all three models, in the OpenAI and Anthropic formats, including tool call deltas
Repeatable runsGetting the same query for the same question, so a number can be auditedtemperature 0 with a fixed seed
Spend controlsStopping a query loop that keeps retryingmax_tokens on every request and a per-request usage export from the dashboard. Budget alerts and limits are on Radium's roadmap

Radium never connects to your database. Your code defines a tool that takes a query, runs it and returns the result to the model. Run that tool under a read-only role, limit it to the schemas the assistant is allowed to see, and set a statement timeout and a row limit. Query results are sent to the model as part of the conversation, so treat them as data leaving the warehouse and check that against your data policy.

Three things do not carry over unchanged. Radium does not support the Responses API, so an assistant built on hosted threads keeps its history in your own store. Radium does not offer embeddings, so an assistant that searches table descriptions by meaning keeps its current embedding provider. Radium's tool calling guide notes minor differences in some less common OpenAI tool options, such as function_call set to none, so test the options you rely on.

Compare all three models on the model overview. The switching guide walks through a four-step evaluation against Anthropic and OpenAI, and Radium's agent workflows page covers running tool loops. An assistant that also answers from the wiki is covered in Internal Copilots. More workloads are in the use cases index.

Run your query tool through the new endpoint on 20 real questions before the pilot.

How to switch

Radium serves OpenAI-compatible and Anthropic-compatible APIs, so an existing analytics assistant keeps its SDK, its prompts, its tool definitions and its query runner. Three values change, which are the base URL, the API key and the model name.

For the OpenAI SDKs, set the base URL to https://api.radium.cloud/v1 and the model to hal-1.0. For the Anthropic SDKs, set the base URL to https://api.radium.cloud, because the SDK adds the /v1 path itself.

Steps

  1. Create an account at deploy.radium.cloud and generate a key at deploy.radium.cloud/keys. New accounts get $25 in credit with no card required.
  2. Store the key as a secret in the service that runs the assistant, and keep it out of the repository and out of browser code.
  3. Change the base URL and model name, then send the same questions to Radium and to your current provider and log both queries and both results.
  4. Compare the results question by question, then move one team at a time.

Switching back means pointing the base URL at your previous provider. Guides for the OpenAI and Anthropic SDKs, LangChain, LlamaIndex and PydanticAI are in the Radium docs.

How to test it on questions your dashboards already answer

Your dashboards already hold the right answers. Before the pilot, collect 100 questions people have asked, each with the number a trusted dashboard or an analyst gives for it, and run them through your current model and through Hal with the same prompt and tools.

  1. Score the results. Two queries can be written differently and return the same rows, so run each generated query and compare its result with the known answer. The BIRD benchmark scores text-to-SQL on execution accuracy for that reason.
  2. Include the questions that break assistants. Add questions that depend on a metric definition, such as revenue before or after refunds, questions that span several tables and questions with a time zone or fiscal calendar in them. Most wrong answers come from these.
  3. Ask questions the data cannot answer. Include 15 questions about data you do not hold. The assistant should say so instead of returning a number from the nearest table.
  4. Measure the loop. Record queries per question, failed queries and cost per answer from the usage export. A model that needs five tries costs more than its price per token suggests.

Use temperature 0 and a fixed seed on both sides, and decide what counts as a pass before you look at the results.

When Radium is the wrong choice

Radium fits when you run your own analytics assistant through your own backend and its usage is a meaningful share of your AI spend. There are cases where switching is the wrong move.

  • Your assistant is built into your warehouse or BI tool. If the vendor chooses the model and runs it inside your account, there is nothing to switch.
  • Query results may not leave your warehouse. The model reads the results to answer, so a policy that keeps all data inside your own cloud account rules out any hosted model API, Radium included.
  • Your assistant is built on hosted threads and file search. Radium does not offer the Responses API, embeddings or file search, so moving means keeping conversation state and table search in your own stack first.
  • Your usage is small. If the bill is a few hundred dollars a month, the evaluation will cost more than the switch saves.
  • Your security review requires a certification Radium does not hold yet. Radium is SOC 2 compliant, and ISO 27001, HIPAA and GDPR work is in progress, so request the SOC 2 report and check status before warehouse data flows through the assistant.

If none of these apply, run the 100 questions.

Frequently asked questions

Can I connect Radium to our database for text-to-SQL?

Radium does not connect to your database. Your code exposes a tool that runs a query, and the model calls it. Tool calling works on all three Radium models through the OpenAI-compatible and Anthropic-compatible endpoints, with multi-step loops on Hal and Clarke, so the model can run a query, read the result and correct it in one answer.

Which Radium model is best for text-to-SQL?

Use Hal (hal-1.0) for writing, running and fixing queries that span several tables. Use Clarke (clarke-1.0) for single-table lookups, explaining results and very large schemas. Use Tycho (tycho-1.0) to route questions and pick likely tables.

How much does a text-to-SQL assistant cost to run on Radium?

Hal costs $2 per million input tokens and $10 per million output tokens. A question that takes three calls, at about 22,700 input tokens and 850 output tokens, costs about $0.054 on Hal and $0.021 on Clarke. At 12,600 questions a month that is about $685 on Hal before prompt caching.

Is it safe to let a model run SQL against our warehouse?

Run the query tool under a read-only role, limit it to the schemas the assistant may see, and set a statement timeout and a row limit. The model only sees what that tool returns. Log every query with the question that produced it, so any number can be traced.

How accurate is text-to-SQL on Radium?

It depends on your schema and how well your metrics are defined, so measure it on your own questions. Collect 100 questions with known answers, run the generated queries and compare the results. Radium's published benchmarks use its own task suite, so they will not tell you how a model does on your warehouse.

Does Radium train on our data or query results?

No. Radium does not train on customer data, and prompts and completions are used only to service the request. Radium is SOC 2 compliant, and ISO 27001, HIPAA and GDPR work is in progress.