Supplement AI

Supplement AI · Ações GPT

SupplementAI API

API for retrieving relevant studies on dietary supplements.

  • POST /api/GPTqueryGet relevant studies based on the query
Esquema API original
{
  "openapi": "3.0.0",
  "info": {
    "title": "SupplementAI API",
    "description": "API for retrieving relevant studies on dietary supplements.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://supplementai.io"
    }
  ],
  "components": {
    "schemas": {
      "QueryRequest": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "example": "Best supplement for weight loss"
          }
        },
        "required": [
          "query"
        ]
      },
      "Study": {
        "type": "object",
        "properties": {
          "abstract": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string"
          },
          "tldr": {
            "type": "object",
            "properties": {
              "model": {
                "type": "string"
              },
              "text": {
                "type": "string"
              }
            },
            "nullable": true
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "title",
          "url"
        ]
      }
    }
  },
  "paths": {
    "/api/GPTquery": {
      "post": {
        "summary": "Get relevant studies based on the query",
        "operationId": "getStudies",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A list of relevant studies",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Study"
                  },
                  "maxItems": 1
                },
                "example": [
                  {
                    "abstract": "Over-the-counter dietary supplements to treat obesity appeal to many patients who desire a \"magic bullet\" for weight loss. Asking overweight patients about their use of weight-loss supplements and understanding the evidence for the efficacy, safety, and quality of these supplements are critical when counseling patients regarding weight loss. A schema for whether physicians should recommend, caution, or discourage use of a particular weight-loss supplement is presented in this article. More than 50 individual dietary supplements and more than 125 commercial combination products are available for weight loss. Currently, no weight-loss supplements meet criteria for recommended use. Although evidence of modest weight loss secondary to ephedra-caffeine ingestion exists, potentially serious adverse effects have led the U.S. Food and Drug Administration to ban the sale of these products. Chromium is a popular weight-loss supplement, but its efficacy and long-term safety are uncertain. Guar gum and chitosan appear to be ineffective; therefore, use of these products should be discouraged. Because of insufficient or conflicting evidence regarding the efficacy of conjugated linoleic acid, ginseng, glucomannan, green tea, hydroxycitric acid, L-carnitine, psyllium, pyruvate, and St. John's wort in weight loss, physicians should caution patients about the use of these supplements and closely monitor those who choose to use these products.",
                    "title": "Common dietary supplements for weight loss.",
                    "tldr": {
                      "model": "tldr@v2.0.0",
                      "text": "Because of insufficient or conflicting evidence regarding the efficacy of conjugated linoleic acid, ginseng, glucomannan, green tea, hydroxycitric acid, L-carnitine, psyllium, pyruvate, and St. John's wort in weight loss, physicians should caution patients about the use of these supplements and closely monitor those who choose to use these products."
                    },
                    "url": "https://www.semanticscholar.org/paper/c32bc1184c49008f2cf3a1f388e6ee03a724c619"
                  },
                  {
                    "abstract": null,
                    "title": "Dietary supplements marketed for weight loss.",
                    "tldr": null,
                    "url": "https://www.semanticscholar.org/paper/082d342ece8e6c851e1b8b63941b0771e115a95a"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ]
      }
    }
  },
  "securitySchemes": {
    "api_key": {
      "type": "apiKey",
      "name": "x-api-key",
      "in": "header"
    }
  }
}