int
int · GPT Actions
Substance Information API
POST /smartRetrieves information about a substance including its name, cross tolerances, uncertain interactions, unsafe interactions, dangerous interactions, routes of administration (ROAs) with dosage and duration, effects, chemical and psychoactive classes, images, addiction potential, and toxicity.
原始 API 定义
{
"openapi": "3.0.0",
"info": {
"title": "Substance Information API",
"version": "1.0.0"
},
"servers": [
{
"url": "https://pf.psy.dev/api"
}
],
"paths": {
"/smart": {
"post": {
"operationId": "getSubstancesInformations",
"summary": "Retrieves information about a substance including its name, cross tolerances, uncertain interactions, unsafe interactions, dangerous interactions, routes of administration (ROAs) with dosage and duration, effects, chemical and psychoactive classes, images, addiction potential, and toxicity.",
"parameters": [],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"query": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "string",
"enum": [
"addictionPotential",
"bioavailability",
"class",
"commonNames",
"crossTolerances",
"dangerousInteractions",
"dose",
"duration",
"effects",
"images",
"interactions",
"roas",
"toxicity",
"uncertainInteractions",
"unsafeInteractions"
]
}
}
},
"required": [
"name",
"fields"
]
}
}
},
"required": [
"query"
]
}
}
}
},
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"ERROR",
"OK"
]
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"commonNames": {
"type": "array",
"items": {
"type": "string"
}
},
"crossTolerances": {
"type": "array",
"items": {
"type": "string"
}
},
"uncertainInteractions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"commonNames": {
"type": "array",
"items": {
"type": "string"
}
},
"crossTolerances": {
"type": "array",
"items": {
"type": "string"
}
},
"unsafeInteractions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
}
},
"class": {
"type": "object",
"properties": {
"chemical": {
"type": "array",
"items": {
"type": "string"
}
},
"psychoactive": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"addictionPotential": {
"type": "string"
},
"toxicity": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"unsafeInteractions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"commonNames": {
"type": "array",
"items": {
"type": "string"
}
},
"crossTolerances": {
"type": "array",
"items": {
"type": "string"
}
},
"unsafeInteractions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
}
},
"class": {
"type": "object",
"properties": {
"chemical": {
"type": "array",
"items": {
"type": "string"
}
},
"psychoactive": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"addictionPotential": {
"type": "string"
},
"toxicity": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"dangerousInteractions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"commonNames": {
"type": "array",
"items": {
"type": "string"
}
},
"crossTolerances": {
"type": "array",
"items": {
"type": "string"
}
},
"unsafeInteractions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
}
},
"class": {
"type": "object",
"properties": {
"chemical": {
"type": "array",
"items": {
"type": "string"
}
},
"psychoactive": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"addictionPotential": {
"type": "string"
},
"toxicity": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"roas": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"dose": {
"type": "object",
"properties": {
"units": {
"type": "string"
},
"threshold": {
"type": "number"
},
"heavy": {
"type": "number"
},
"common": {
"type": "object",
"properties": {
"min": {
"type": "number"
},
"max": {
"type": "number"
}
}
},
"light": {
"type": "object",
"properties": {
"min": {
"type": "number"
},
"max": {
"type": "number"
}
}
},
"strong": {
"type": "object",
"properties": {
"min": {
"type": "number"
},
"max": {
"type": "number"
}
}
}
}
},
"duration": {
"type": "object",
"properties": {
"afterglow": {
"type": "object",
"properties": {
"min": {
"type": "number"
},
"max": {
"type": "number"
},
"units": {
"type": "string"
}
}
},
"comeup": {
"type": "object",
"properties": {
"min": {
"type": "number"
},
"max": {
"type": "number"
},
"units": {
"type": "string"
}
}
},
"duration": {
"type": "object",
"properties": {
"min": {
"type": "number"
},
"max": {
"type": "number"
},
"units": {
"type": "string"
}
}
},
"offset": {
"type": "object",
"properties": {
"min": {
"type": "number"
},
"max": {
"type": "number"
},
"units": {
"type": "string"
}
}
},
"onset": {
"type": "object",
"properties": {
"min": {
"type": "number"
},
"max": {
"type": "number"
},
"units": {
"type": "string"
}
}
},
"peak": {
"type": "object",
"properties": {
"min": {
"type": "number"
},
"max": {
"type": "number"
},
"units": {
"type": "string"
}
}
},
"total": {
"type": "object",
"properties": {
"min": {
"type": "number"
},
"max": {
"type": "number"
},
"units": {
"type": "string"
}
}
}
}
},
"bioavailability": {
"type": "object",
"properties": {
"min": {
"type": "number"
},
"max": {
"type": "number"
}
}
}
}
}
},
"effects": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"url": {
"type": "string",
"format": "uri"
}
}
}
},
"class": {
"type": "object",
"properties": {
"chemical": {
"type": "array",
"items": {
"type": "string"
}
},
"psychoactive": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"images": {
"type": "array",
"items": {
"type": "object",
"properties": {
"thumb": {
"type": "string",
"format": "uri"
},
"image": {
"type": "string",
"format": "uri"
}
}
}
},
"addictionPotential": {
"type": "string"
},
"toxicity": {
"type": "array",
"items": {
"type": "string"
}
}
},
"nullable": true
}
}
}
}
}
}
}
}
}
}
}
}