Large language models are increasingly used to parse molecular representations, predict reaction outcomes, and orchestrate multi-step agentic workflows in computational chemistry. These tasks often involve lengthy SMILES strings, protein sequences, or full research papers as context, which quickly increases token counts and costs on traditional inference platforms. For teams building chemistry tools, the underlying API pricing model and context window limits can become bottlenecks before model accuracy ever does.
The Context Bottleneck in Computational Chemistry
Chemistry data is inherently verbose. A single protein sequence or a batch of SMILES strings can consume thousands of tokens, and agentic workflows that query external databases such as PubChem or RDKit require multiple turns to reach a conclusion. On token-based providers, long inputs and multi-step reasoning directly inflate costs.
Oxlo.ai is a developer-first AI inference platform with request-based pricing. It charges one flat cost per API request regardless of prompt length, so cost does not scale with input length. For chemistry applications that pass large molecular graphs or lengthy literature context into the prompt, this structure makes Oxlo.ai significantly cheaper than token-based alternatives for long-context and agentic workloads.
Building a SMILES Property Extractor
A common task is extracting molecular properties from a SMILES string. With Oxlo.ai, you can use any general-purpose or coding model, such as Llama 3.3 70B or DeepSeek V3.2, through a fully OpenAI compatible endpoint. The example below sends a SMILES string and requests structured JSON output.
import os
import openai
client = openai.OpenAI(
base_url="https://api.oxlo.ai/v1",
api_key=os.environ["OXLO_API_KEY"]
)
smiles = "CC(C)Cc1ccc(cc1)C(C)C(=O)O" # ibuprofen
response = client.chat.completions.create(
model="Llama 3.3 70B",
messages=[{
"role": "user",
"content": (
f"Given the SMILES string {smiles}, "
"predict LogP, molecular weight, and topological polar surface area. "
"Return the result as JSON with keys: logp, mw, tpsa."
)
}],
response_format={"type": "json_object"}
)
print(response.choices[0].message.content)
Because Oxlo.ai does not charge by the token, passing a long list of SMILES or a detailed system prompt with cheminformatics instructions does not change the per-request cost. You can iterate on prompts without watching input tokens accumulate.
Agentic Workflows with Function Calling
More advanced chemistry tools do not stop at text generation. They call external calculators, search chemical databases, or verify safety constraints. Oxlo.ai supports function calling and tool use, so you can build agents that reason over molecular data and then invoke Python tools.
import openai
client = openai.OpenAI(
base_url="https://api.oxlo.ai/v1",
api_key=os.environ["OXLO_API_KEY"]
)
tools = [{
"type": "function",
"function": {
"name": "compute_tpsa",
"description": "Compute topological polar surface area from SMILES",
"parameters": {
"type": "object",
"properties": {
"smiles": {"type": "string"}
},
"required": ["smiles"]
}
}
}]
response = client.chat.completions.create(
model="Qwen 3 32B",
messages=[{
"role": "user",
"content": "Compute the TPSA for CC(O)CN and confirm it is under 50."
}],
tools=tools
)
print(response.choices[0].message.tool_calls)
Models such as Qwen 3 32B and GLM 5 are designed for agent workflows and long-horizon agentic tasks, making them strong candidates for multi-step chemistry pipelines. Since Oxlo.ai has no cold starts on popular models, the first request in a new session returns immediately, which matters when you are iterating in a notebook or running automated screening jobs.
Model Selection and Cost Structure
Oxlo.ai offers 45+ open-source and proprietary models across 7 categories. For chemistry tooling, the following are particularly relevant:
- Llama 3.3 70B: general-purpose flagship for broad reasoning.
- DeepSeek R1 671B MoE: deep reasoning and complex coding for quantum chemistry scripts or reaction mechanism analysis.
- DeepSeek V3.2: coding and reasoning, available on the free tier for early prototyping.
- Qwen 3 32B: multilingual reasoning and agent workflows for international research teams.
- Kimi K2.6: advanced reasoning, agentic coding, and vision with a 131K context window for parsing long spectroscopy reports or chemical patents.
- Gemma 3 27B and Kimi VL A3B: vision models for interpreting chemical diagrams and lab notebook images.
Request-based pricing can be 10-100x cheaper than token-based pricing for long-context workloads. If your pipeline passes entire papers, multi-step conversation history, or large structured molecular files to the model, the cost advantage of a flat per-request rate compounds quickly. See the Oxlo.ai pricing page for current plan details.
Getting Started
The Oxlo.ai API is a drop-in replacement for the OpenAI SDK. You can start with Python, Node.js, or cURL. Below is a minimal cURL example to verify connectivity.
curl https://api.oxlo.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OXLO_API_KEY" \
-d '{
"model": "DeepSeek V3.2",
"messages": [{"role": "user", "content": "Explain the Suzuki reaction in one paragraph."}]
}'
Sign up for the Free plan to get 60 requests per day across 16+ free models, including a 7-day full-access trial. When you are ready to scale, Pro and Premium plans offer 1,000 and 5,000 requests per day respectively, with priority queue access under Premium. For dedicated throughput and unlimited volume, Enterprise plans provide custom pricing and dedicated GPUs.
Top comments (0)