Storing generated documents in your own system and displaying them

While we recommend that you keep you generated documents in Inkit's secure storage and retrieve them through document IDs in your application when you want to display them, you can also download them into your own datastore and then retrieve and display them in your application.

To do this, make the following API call:

# Import the Inkit Python package
import inkit
from inkit.exceptions import InkitResponseException

# Replace the string below with your API key
inkit.api_token = "ENTER YOUR API KEY"

   # Specify the ID of the document
   # Get a generated PDF document
   resp =
except InkitResponseException as err:
   # Print any error
// Import the Inkit Node.js package
const Inkit = require("inkit");

// Replace the string below with your API key
Inkit.apiToken = "ENTER YOUR API KEY";

// Call PDF download

// Download a PDF document
async function downloadDocument() {
    try {
        const result = await'ENTER YOUR DOCUMENT ID');
        // Print the JSON response of the API call
        console.log(JSON.stringify(, null, 3));
    } catch (error) {
        // Print any error
        console.error(error.response.status, error.response.statusText);
curl --request GET \
     --url \
     --header 'X-Inkit-API-Token: ENTER YOUR API KEY' \
     --header 'accept: application/pdf'

After executing the above call, you will have the raw contents of the generated document, which you can write to your datastore. Afterward, you can display the document in your application using a PDF viewer of your choice.