跳转到主要内容
POST
Convert Webpage URL to PDF

请求规范

  • 方法与路径: POST /apis/v1/pdf-co/pdf-from-url
  • 可用状态: enabled
  • 请求 URL 模板: https://api.aisa.one/apis/v1/pdf-co/pdf-from-url
完整 OpenAPI 定义 有效请求声明(包括认证和引用的 schema):

费用与请求规则

按实际用量收费。 默认请求预估费用:$0.0103 USD。 最终费用以实际用量为准。 账户适用价格可能不同;支持报价的接口可按实际请求获取报价。

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json
url
string
必填

Public webpage URL to convert to PDF.

DoNotWaitFullLoad
boolean

Whether to begin conversion after minimal loading instead of waiting for the full page load.

expiration
integer

Number of minutes before the temporary output link expires.

HTML inserted in the footer of every output page.

header
string

HTML inserted in the header of every output page.

legacyRendition
boolean

Whether to render with PDF.co's legacy Chromium version.

margins
string

Page margins as one value or as top, right, bottom, and left values using px, mm, cm, or in units.

mediaType
enum<string>

CSS media type used to render the webpage.

可用选项:
print,
screen,
none
name
string

File name for the generated PDF.

orientation
enum<string>

Portrait or landscape page orientation.

可用选项:
Portrait,
Landscape
paperSize
string

Standard paper size such as Letter or A4, or a custom width and height such as '200mm 300mm'.

printBackground
boolean

Whether to include webpage background colors and images.

profiles
string

Advanced PDF.co conversion settings as a JSON-formatted string.

renderTimeout
integer

Maximum webpage rendering time in milliseconds, up to 177000.

必填范围: x <= 177000

响应

Tool result data

error
boolean
必填
status
必填
credits
integer
duration
integer
name
string
pageCount
integer
remainingCredits
integer
url
string