HyperGPT
  • Overview
    • 🟣HyperGPT
    • ⛓️AI & Blockchain
    • 🛠️Problems & Solutions
    • 🤖HyperSolutions
      • HyperX Pad
      • HyperAgent
      • HyperStore
      • HyperSDK
      • HyperNFT
    • 👾Products
    • ⚙️HyperSDK
      • 1. User
        • 1.1 How to Get API Key
        • 1.2 Get Token
        • 1.3 Get Balance
      • 2. AI
        • 2.1 Hyper Portraits
        • 2.2 Hyper Art
        • 2.3 Hyper Ocr
        • 2.4 Hyper Extract
        • 2.5 Hyper Contracts
        • 2.6 Hyper Post
        • 2.7 Hyper Code
        • 2.8 Hyper Chat
        • 2.9 Hyper Pdf
        • 2.10 Hyper Images
    • 🧑‍🔬Incubation
      • 🪐Pluton
    • 🌎Market
    • 🎯Roadmap
    • 👋Contact
    • 🏳️Disclaimer
  • HyperBUIDL Program
    • 🚧HyperBUIDL | Phase #1
  • Ambassador Program
    • 🥇HyperGPT Presents the Ambassador Program
  • HyperDAO
    • 📥About HyperDAO
    • 🤖HyperDAO Roles
  • $HGPT Token
    • 🪙Token Utility
    • 📈$HGPT Tokenomics
      • Token Sale (IDO)
    • 🔥Burn Mechanism
    • 🧑‍🌾Staking & Farming
    • 💰Buy $HGPT Token
    • 🛡️Audit
  • Airdrop Campaigns
    • 🏆HyperGPT Zealy Campaign - $10,000 - [Ended]
    • 🔥Airdrop Campaign - $20,000 - HyperGPT [Ended]
Powered by GitBook
On this page
  1. Overview
  2. HyperSDK
  3. 2. AI

2.9 Hyper Pdf

The HyperPdf endpoint enables users to ask questions related to a PDF document identified by its source ID. The system verifies if the user has sufficient credits before processing the question.

Method:POST

Endpoint

https://sdk.hypergpt.ai/hyperPdf

Headers:

Bearer Token

new_user_token

Params:

  • question (str): The question asked by the user regarding the content of the PDF document.

Files :

  • file: The unique identifier of the PDF document for which the question is being .

Example Request:

headers = {
    "Authorization": "Bearer " + bearer_token,

}
params= {
    "question": question,
}
files = {
    "file": (file.filename, file.file, file.content_type)
}
response = requests.post(
    "https://sdk.hypergpt.ai/hyperPdf",
    headers=headers,
    params=params,
    files=files
)

return response.json()

Example Response (Success):

{
    "response": "The main findings of the report include..."
}

Example Response (Error):

{
    "detail": "Credit not enough"
}

This endpoint allows users to ask questions related to a PDF document and receive responses. It validates the user's token, checks their credits, and logs the API usage. If the user has enough credits, the question is processed, and the response is returned; otherwise, an error message is returned.

Previous2.8 Hyper ChatNext2.10 Hyper Images

Last updated 4 months ago

⚙️