POD Intelligence
API & Integrations
Integrate PODScan AI with your systems.
API Endpoint
Send a POST request to the following URL to process a document.
Replace YOUR_APP_ID with your actual App ID, which can be found in your app's settings or the URL of your browser.
https://base44.app/api/apps/YOUR_APP_ID/functions/apiProcessDocumentAuthentication
Include your API key in the X-API-Key header of your request.
For demo purposes, you can use the key demo-key-123. For production, please set a comma-separated list of keys in the `API_KEYS` environment variable in your app settings.
Request Body
The request must be sent as multipart/form-data with the following fields:
- document (required): The document file (e.g., JPG, PNG, PDF).
- format (optional): The desired response format. Can be "detailed" (default) or "simple".
Example Usage
cURL Example
curl -X POST "https://base44.app/api/apps/YOUR_APP_ID/functions/apiProcessDocument" \
-H "Content-Type: multipart/form-data" \
-H "X-API-Key: YOUR_API_KEY" \
-F "document=@/path/to/your/pod.jpg" \
-F "format=detailed"JavaScript (fetch) Example
const uploadAndProcess = async (file, apiKey) => {
const endpoint = "https://base44.app/api/apps/YOUR_APP_ID/functions/apiProcessDocument";
const formData = new FormData();
formData.append("document", file);
formData.append("format", "detailed"); // or "simple"
try {
const response = await fetch(endpoint, {
method: "POST",
headers: {
"X-API-Key": apiKey,
},
body: formData,
});
if (!response.ok) {
throw new Error(`API request failed: ${response.statusText}`);
}
const result = await response.json();
console.log("Analysis Result:", result);
return result;
} catch (error) {
console.error("Error:", error);
}
};