Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
magpai-app /cog-puppeteer:6b398d82
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run magpai-app/cog-puppeteer using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"magpai-app/cog-puppeteer:6b398d82979e96b69891018e8d7ab1a1604d3abf01f1cc494d07d64b28f9b19e",
{
input: {
data: "https://google.com",
mode: "url",
width: 1920,
format: "png",
height: 1080,
pdfSize: "A4"
}
}
);
console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run magpai-app/cog-puppeteer using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"magpai-app/cog-puppeteer:6b398d82979e96b69891018e8d7ab1a1604d3abf01f1cc494d07d64b28f9b19e",
input={
"data": "https://google.com",
"mode": "url",
"width": 1920,
"format": "png",
"height": 1080,
"pdfSize": "A4"
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run magpai-app/cog-puppeteer using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"version": "magpai-app/cog-puppeteer:6b398d82979e96b69891018e8d7ab1a1604d3abf01f1cc494d07d64b28f9b19e",
"input": {
"data": "https://google.com",
"mode": "url",
"width": 1920,
"format": "png",
"height": 1080,
"pdfSize": "A4"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{
"completed_at": "2023-12-20T07:14:03.865031Z",
"created_at": "2023-12-20T07:13:50.977966Z",
"data_removed": false,
"error": null,
"id": "6efbr5rbqbyvuuvc4ky5rcp4ni",
"input": {
"data": "https://google.com",
"mode": "url",
"width": 1920,
"format": "png",
"height": 1080,
"pdfSize": "A4"
},
"logs": "inputs.json written\ncomp.json written\nadded 111 packages, and audited 112 packages in 9s\n9 packages are looking for funding\nrun `npm fund` for details\nfound 0 vulnerabilities\nRendering complete",
"metrics": {
"predict_time": 12.790896,
"total_time": 12.887065
},
"output": {
"image": "https://replicate.delivery/pbxt/1EYIgB0keBSnFqArwcj5Fs87DLa37zJzG63hEUEzWordMCCJA/output.png"
},
"started_at": "2023-12-20T07:13:51.074135Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/6efbr5rbqbyvuuvc4ky5rcp4ni",
"cancel": "https://api.replicate.com/v1/predictions/6efbr5rbqbyvuuvc4ky5rcp4ni/cancel"
},
"version": "6b398d82979e96b69891018e8d7ab1a1604d3abf01f1cc494d07d64b28f9b19e"
}
inputs.json written
comp.json written
added 111 packages, and audited 112 packages in 9s
9 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Rendering complete