APIAPI reference
Convert explicit molecular and reaction formats
POST /v1/chemistry/convert-representation
POST /v1/chemistry/convert-representation
Authorization
This operation requires a bearer credential. The description defines additional role, scope or first-party-session restrictions; an API key does not grant those permissions by itself.
Request body
| Property | Type | Required | Details |
|---|---|---|---|
data | string | yes | |
input_format | "smiles" ∣ "inchi" ∣ "mol" ∣ "sdf" ∣ "reaction_smiles" ∣ "rxn" | yes | |
output_format | "smiles" ∣ "inchi" ∣ "inchikey" ∣ "mol" ∣ "mol_v3000" ∣ "sdf" ∣ "reaction_smiles" ∣ "rxn" ∣ "rxn_v3000" ∣ "formula" ∣ "unicode_formula" | yes | |
allow_lossy | boolean | no | Default: false. |
Full schema: ConvertRepresentationRequest
{
"properties": {
"data": {
"type": "string",
"maxLength": 20000,
"minLength": 1,
"title": "Data"
},
"input_format": {
"type": "string",
"enum": [
"smiles",
"inchi",
"mol",
"sdf",
"reaction_smiles",
"rxn"
],
"title": "Input Format"
},
"output_format": {
"type": "string",
"enum": [
"smiles",
"inchi",
"inchikey",
"mol",
"mol_v3000",
"sdf",
"reaction_smiles",
"rxn",
"rxn_v3000",
"formula",
"unicode_formula"
],
"title": "Output Format"
},
"allow_lossy": {
"type": "boolean",
"title": "Allow Lossy",
"default": false
}
},
"additionalProperties": false,
"type": "object",
"required": [
"data",
"input_format",
"output_format"
],
"title": "ConvertRepresentationRequest"
}Responses
| HTTP | Details | Type |
|---|---|---|
| 200 | Successful Response | application/json: RepresentationConversionResult |
| 401 | Unauthorized | application/problem+json: ProblemDetails |
| 402 | Payment Required | application/problem+json: ProblemDetails |
| 403 | Forbidden | application/problem+json: ProblemDetails |
| 408 | Request Timeout | application/problem+json: ProblemDetails |
| 413 | Request Entity Too Large | application/problem+json: ProblemDetails |
| 422 | Unprocessable Entity | application/problem+json: ProblemDetails |
| 429 | Too Many Requests | application/problem+json: ProblemDetails |
| 502 | Bad Gateway | application/problem+json: ProblemDetails |
| 503 | Service Unavailable | application/problem+json: ProblemDetails |
Response: RepresentationConversionResult
| Property | Type | Required | Details |
|---|---|---|---|
input_format | "smiles" ∣ "inchi" ∣ "mol" ∣ "sdf" ∣ "reaction_smiles" ∣ "rxn" | yes | |
output_format | "smiles" ∣ "inchi" ∣ "inchikey" ∣ "mol" ∣ "mol_v3000" ∣ "sdf" ∣ "reaction_smiles" ∣ "rxn" ∣ "rxn_v3000" ∣ "formula" ∣ "unicode_formula" | yes | |
kind | "molecule" ∣ "molecule_collection" ∣ "reaction" | yes | |
record_count | integer | yes | |
output | string | yes | |
records | ConvertedRepresentationRecord[] | yes | |
canonical_reaction_smiles | string ∣ null | yes | |
lossy | boolean | yes | |
warnings | string[] | yes | |
limitations | string[] | yes |
Full schema
{
"properties": {
"input_format": {
"type": "string",
"enum": [
"smiles",
"inchi",
"mol",
"sdf",
"reaction_smiles",
"rxn"
],
"title": "Input Format"
},
"output_format": {
"type": "string",
"enum": [
"smiles",
"inchi",
"inchikey",
"mol",
"mol_v3000",
"sdf",
"reaction_smiles",
"rxn",
"rxn_v3000",
"formula",
"unicode_formula"
],
"title": "Output Format"
},
"kind": {
"type": "string",
"enum": [
"molecule",
"molecule_collection",
"reaction"
],
"title": "Kind"
},
"record_count": {
"type": "integer",
"title": "Record Count"
},
"output": {
"type": "string",
"title": "Output"
},
"records": {
"items": {
"$ref": "#/components/schemas/ConvertedRepresentationRecord"
},
"type": "array",
"title": "Records"
},
"canonical_reaction_smiles": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Canonical Reaction Smiles"
},
"lossy": {
"type": "boolean",
"title": "Lossy"
},
"warnings": {
"items": {
"type": "string"
},
"type": "array",
"title": "Warnings"
},
"limitations": {
"items": {
"type": "string"
},
"type": "array",
"title": "Limitations"
}
},
"additionalProperties": true,
"type": "object",
"required": [
"input_format",
"output_format",
"kind",
"record_count",
"output",
"records",
"canonical_reaction_smiles",
"lossy",
"warnings",
"limitations"
],
"title": "RepresentationConversionResult"
}This page is generated from OpenAPI; examples are schemas, not a fabricated successful response.