curl -X POST https://win.oneshotagent.com/v1/tools/resolve/compound \
-H "Content-Type: application/json" \
-H "payment-signature: <base64 x402 payment>" \
-d '{
"name": "aspirin"
}'
const response = await fetch("https://win.oneshotagent.com/v1/tools/resolve/compound", {
method: "POST",
headers: {
"Content-Type": "application/json",
"payment-signature": paymentProof,
},
body: JSON.stringify({
"name": "aspirin"
}),
});
const result = await agent.tool('resolve/compound', {
name: 'aspirin'
});
console.log(result.data.result);
console.log(result.data.evidence);
{
"success": true,
"data": {
"request_id": "uuid",
"receipt_id": "rcpt_...",
"status": "completed",
"tool": "compound_resolve",
"result": {
"matches": [
{
"cid": 2244,
"iupac_name": "2-acetyloxybenzoic acid",
"molecular_formula": "C9H8O4",
"inchikey": "BSYNRYMUTXBXSQ-UHFFFAOYSA-N",
"smiles": "CC(=O)OC1=CC=CC=C1C(=O)O",
"page_url": "https://pubchem.ncbi.nlm.nih.gov/compound/2244"
}
],
"ambiguous": false
},
"evidence": {
"source": "US National Center for Biotechnology Information (PubChem)",
"source_kind": "public",
"retrieved_at": "2026-01-15T12:00:00.000Z",
"calls": [
{
"retrieved_at": "2026-01-15T12:00:00.000Z"
}
],
"as_of": null
}
}
}
Life sciences
Compound Resolve
Resolve a name, CAS number, InChIKey or SMILES to chemical compound identities.
POST
/
v1
/
tools
/
resolve
/
compound
curl -X POST https://win.oneshotagent.com/v1/tools/resolve/compound \
-H "Content-Type: application/json" \
-H "payment-signature: <base64 x402 payment>" \
-d '{
"name": "aspirin"
}'
const response = await fetch("https://win.oneshotagent.com/v1/tools/resolve/compound", {
method: "POST",
headers: {
"Content-Type": "application/json",
"payment-signature": paymentProof,
},
body: JSON.stringify({
"name": "aspirin"
}),
});
const result = await agent.tool('resolve/compound', {
name: 'aspirin'
});
console.log(result.data.result);
console.log(result.data.evidence);
{
"success": true,
"data": {
"request_id": "uuid",
"receipt_id": "rcpt_...",
"status": "completed",
"tool": "compound_resolve",
"result": {
"matches": [
{
"cid": 2244,
"iupac_name": "2-acetyloxybenzoic acid",
"molecular_formula": "C9H8O4",
"inchikey": "BSYNRYMUTXBXSQ-UHFFFAOYSA-N",
"smiles": "CC(=O)OC1=CC=CC=C1C(=O)O",
"page_url": "https://pubchem.ncbi.nlm.nih.gov/compound/2244"
}
],
"ambiguous": false
},
"evidence": {
"source": "US National Center for Biotechnology Information (PubChem)",
"source_kind": "public",
"retrieved_at": "2026-01-15T12:00:00.000Z",
"calls": [
{
"retrieved_at": "2026-01-15T12:00:00.000Z"
}
],
"as_of": null
}
}
}
Give exactly one of name (a common, trade or systematic name, or a CAS registry number), inchikey or smiles. Returns compound identifiers, computed names, molecular formulas, InChIKeys, connectivity SMILES and compound page links. Matches retain the source order, up to limit. Ambiguous is true whenever the source matched more than one CID, even if limit returns only one. An unknown compound returns an empty matches list. SMILES containing / or \ are refused because the source path form cannot carry them. Identity only: no synonym lists, depositor records, synthesis routes, preparation methods or precursor lists.
Authentication
Requires x402 payment in thepayment-signature header.
Request Body
string
A common, trade or systematic chemical name, or a CAS registry number such as 50-78-2; give exactly one of name, inchikey or smiles. 2 to 200 characters.
string
The compound InChIKey; give exactly one of name, inchikey or smiles. Exactly 27 characters.
string
A SMILES structure string without / or , which the source path form cannot carry; give exactly one of name, inchikey or smiles. 1 to 500 characters.
integer
The most matching compounds to return. From 1 to 10. Defaults to
5.Response (200 OK)
Top-level envelope:success (boolean) and data (object). All fields below are nested under data.
string
Durable job ID for audit and lookup
string
Job status:
completedstring
Always
compound_resolveobject
The answer, described under Result below
object
Where the answer came from and when
string
The public body the data comes from. Always
US National Center for Biotechnology Information (PubChem).string
public when the data comes from a public body, commercial otherwisestring
When the lookup was made, as an ISO 8601 UTC time
string
When the source says the fact was last updated, or
null when the source gives no dateResult
Nested underdata.result.
object[]
Matching compounds in source order, up to limit.
integer
The PubChem compound identifier.
string
The computed systematic name.
string
The molecular formula.
string
The InChIKey identifier.
string
The connectivity SMILES structure string.
string
The compound page URL.
boolean
True when the source returned more than one CID, before applying limit.
curl -X POST https://win.oneshotagent.com/v1/tools/resolve/compound \
-H "Content-Type: application/json" \
-H "payment-signature: <base64 x402 payment>" \
-d '{
"name": "aspirin"
}'
const response = await fetch("https://win.oneshotagent.com/v1/tools/resolve/compound", {
method: "POST",
headers: {
"Content-Type": "application/json",
"payment-signature": paymentProof,
},
body: JSON.stringify({
"name": "aspirin"
}),
});
const result = await agent.tool('resolve/compound', {
name: 'aspirin'
});
console.log(result.data.result);
console.log(result.data.evidence);
{
"success": true,
"data": {
"request_id": "uuid",
"receipt_id": "rcpt_...",
"status": "completed",
"tool": "compound_resolve",
"result": {
"matches": [
{
"cid": 2244,
"iupac_name": "2-acetyloxybenzoic acid",
"molecular_formula": "C9H8O4",
"inchikey": "BSYNRYMUTXBXSQ-UHFFFAOYSA-N",
"smiles": "CC(=O)OC1=CC=CC=C1C(=O)O",
"page_url": "https://pubchem.ncbi.nlm.nih.gov/compound/2244"
}
],
"ambiguous": false
},
"evidence": {
"source": "US National Center for Biotechnology Information (PubChem)",
"source_kind": "public",
"retrieved_at": "2026-01-15T12:00:00.000Z",
"calls": [
{
"retrieved_at": "2026-01-15T12:00:00.000Z"
}
],
"as_of": null
}
}
}
See Pricing for this tool’s price. A wallet (x402) call receives it in the 402 quote before anything is charged; a call paid from prepaid credits is charged when the API accepts the request and answers
200.Notes
- Results return inline. The finished job stays available at
/v1/requests/{request_id}