APIСправочник API
Атомный баланс
POST /v1/chemistry/balance
POST /v1/chemistry/balance
Доступ
Требуется bearer-авторизация. Описание операции задаёт дополнительные права, роли и ограничения для сессий кабинета. Сам по себе API-ключ их не предоставляет.
Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
reaction_smiles | string | да | |
method | "coefficients" ∣ "synrbl" | нет | По умолчанию: "coefficients". |
Полная схема: BalanceReactionRequest
{
"properties": {
"reaction_smiles": {
"type": "string",
"maxLength": 10000,
"minLength": 1,
"title": "Reaction Smiles"
},
"method": {
"type": "string",
"enum": [
"coefficients",
"synrbl"
],
"title": "Method",
"default": "coefficients"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"reaction_smiles"
],
"title": "BalanceReactionRequest"
}Ответы
| HTTP | Описание | Тип |
|---|---|---|
| 200 | Успешный ответ | application/json: ReactionBalanceResult |
| 401 | Требуется авторизация | application/problem+json: ProblemDetails |
| 402 | Недостаточно кредитов | application/problem+json: ProblemDetails |
| 403 | Доступ запрещён | application/problem+json: ProblemDetails |
| 408 | Время запроса истекло | application/problem+json: ProblemDetails |
| 413 | Превышен размер запроса | application/problem+json: ProblemDetails |
| 422 | Ошибка входных данных | application/problem+json: ProblemDetails |
| 429 | Превышен лимит | application/problem+json: ProblemDetails |
| 502 | Ошибка шлюза | application/problem+json: ProblemDetails |
| 503 | Сервис недоступен | application/problem+json: ProblemDetails |
Ответ: ReactionBalanceResult
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
method | "coefficients" ∣ "synrbl" | да | |
status | "invalid" ∣ "already_balanced" ∣ "balanced" ∣ "unsolved" ∣ "ambiguous" ∣ "limit_exceeded" | да | |
solved | boolean | да | |
original_reaction_smiles | string | да | |
balanced_reaction_smiles | string ∣ null | да | |
reactant_coefficients | ReactionCoefficient[] | да | |
product_coefficients | ReactionCoefficient[] | да | |
imputed_species | boolean | да | |
imputed_reactants | string ∣ null | нет | |
imputed_products | string ∣ null | нет | |
model_diagnostics | object ∣ null | нет | |
validation | ReactionValidationResult | да | |
limitations | string[] | да |
Полная схема
{
"properties": {
"method": {
"type": "string",
"enum": [
"coefficients",
"synrbl"
],
"title": "Method"
},
"status": {
"type": "string",
"enum": [
"invalid",
"already_balanced",
"balanced",
"unsolved",
"ambiguous",
"limit_exceeded"
],
"title": "Status"
},
"solved": {
"type": "boolean",
"title": "Solved"
},
"original_reaction_smiles": {
"type": "string",
"title": "Original Reaction Smiles"
},
"balanced_reaction_smiles": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Balanced Reaction Smiles"
},
"reactant_coefficients": {
"items": {
"$ref": "#/components/schemas/ReactionCoefficient"
},
"type": "array",
"title": "Reactant Coefficients"
},
"product_coefficients": {
"items": {
"$ref": "#/components/schemas/ReactionCoefficient"
},
"type": "array",
"title": "Product Coefficients"
},
"imputed_species": {
"type": "boolean",
"title": "Imputed Species"
},
"imputed_reactants": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Imputed Reactants"
},
"imputed_products": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Imputed Products"
},
"model_diagnostics": {
"anyOf": [
{
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"type": "object"
},
{
"type": "null"
}
],
"title": "Model Diagnostics"
},
"validation": {
"$ref": "#/components/schemas/ReactionValidationResult"
},
"limitations": {
"items": {
"type": "string"
},
"type": "array",
"title": "Limitations"
}
},
"additionalProperties": true,
"type": "object",
"required": [
"method",
"status",
"solved",
"original_reaction_smiles",
"balanced_reaction_smiles",
"reactant_coefficients",
"product_coefficients",
"imputed_species",
"validation",
"limitations"
],
"title": "ReactionBalanceResult"
}Эта страница генерируется из OpenAPI. Примеры показывают схемы, а не вымышленные успешные ответы.