Extract content with Pulpie
curl --request POST \
--url https://api.feyn.ai/v1/extract \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "pulpie",
"html": "<nav>Menu</nav><article><h1>Hello</h1><p>Only this stays.</p></article>"
}
'import requests
url = "https://api.feyn.ai/v1/extract"
payload = {
"model": "pulpie",
"html": "<nav>Menu</nav><article><h1>Hello</h1><p>Only this stays.</p></article>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'pulpie',
html: '<nav>Menu</nav><article><h1>Hello</h1><p>Only this stays.</p></article>'
})
};
fetch('https://api.feyn.ai/v1/extract', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"html": "<string>",
"markdown": "<string>",
"elapsed_ms": 123,
"diagnostics": {}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error"
}
}Models
Extract content with Pulpie
Send page HTML or a base64 text PDF; get the main content back as HTML and Markdown. Also served at /pulpie/v1/extract.
POST
/
v1
/
extract
Extract content with Pulpie
curl --request POST \
--url https://api.feyn.ai/v1/extract \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "pulpie",
"html": "<nav>Menu</nav><article><h1>Hello</h1><p>Only this stays.</p></article>"
}
'import requests
url = "https://api.feyn.ai/v1/extract"
payload = {
"model": "pulpie",
"html": "<nav>Menu</nav><article><h1>Hello</h1><p>Only this stays.</p></article>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'pulpie',
html: '<nav>Menu</nav><article><h1>Hello</h1><p>Only this stays.</p></article>'
})
};
fetch('https://api.feyn.ai/v1/extract', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"html": "<string>",
"markdown": "<string>",
"elapsed_ms": 123,
"diagnostics": {}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error"
}
}Body
application/json
⌘I