convert-to-pdf
Purpose
This skill converts one or multiple documents to PDF by:
1) accepting one or multiple input files from the user,
2) uploading them to the Solutions API convert endpoint,
3) polling the job status until it is finished,
4) returning download URL(s) for the resulting file(s).
If multiple files are converted, the output may contain multiple PDFs and/or a ZIP for download.
Credentials
The API requires an API key used as a Bearer token:
How the user gets an API key:
- - https://login.cross-service-solutions.com/register
- Or the user can provide an API key directly.
Rule: never echo or log the API key.
API endpoints
Base URL:
Create convert job:
- - INLINECODE2
- INLINECODE3 parameters:
-
files (Dokument) — required — multiple files (multiple_files)
- You can convert multiple files and different types into multiple PDFs.
- Multiple files can be downloadable as a zip-file.
Get result by ID:
When done, the response contains:
- -
output.files[] with { name, path } where path is a downloadable URL (PDFs and/or ZIP).
Inputs
Required
- - One or more input files (binary)
- An API key (string)
Optional
Output
Return a structured result:
- -
job_id (number) - INLINECODE10 (string)
- INLINECODE11 (array) containing
{ name, path } for each output file - Convenience fields:
-
download_url (string) if exactly one output exists
-
download_urls (array of strings) for all outputs
- -
input_files (array of strings)
Example output:
```json
{
"job_id": 789,
"status": "done",
"outputs": [
{ "name": "file1.pdf", "path": "https://.../file1.pdf" },
{ "name": "file2.pdf", "path": "https://.../file2.pdf" },
{ "name": "converted.zip", "path": "https://.../converted.zip" }
],
"download_urls": [
"https://.../file1.pdf",
"https://.../file2.pdf",
"https://.../converted.zip"
],
"input_files": ["file1.docx", "file2.pptx"]
}
convert-to-pdf
目的
此技能通过以下步骤将一个或多个文档转换为PDF:
1) 接收用户提供的一个或多个输入文件,
2) 将文件上传至Solutions API的转换端点,
3) 轮询任务状态直至完成,
4) 返回生成文件的下载链接。
如果转换多个文件,输出可能包含多个PDF文件和/或一个ZIP压缩包用于下载。
凭证
API需要使用API密钥作为Bearer令牌:
用户获取API密钥的方式:
- - https://login.cross-service-solutions.com/register
- 或者用户可以直接提供API密钥。
规则: 切勿输出或记录API密钥。
API端点
基础URL:
- - https://api.xss-cross-service-solutions.com/solutions/solutions
创建转换任务:
- - POST /api/31
- multipart/form-data 参数:
- files(文档)— 必填 — 多个文件(multiple_files)
- 您可以转换多个不同类型文件为多个PDF。
- 多个文件可以打包为ZIP文件下载。
按ID获取结果:
任务完成后,响应包含:
- - output.files[] 包含 { name, path },其中 path 是可下载的URL(PDF和/或ZIP)。
输入
必填
- - 一个或多个输入文件(二进制)
- API密钥(字符串)
可选
输出
返回结构化结果:
- - job_id(数字)
- status(字符串)
- outputs(数组)包含每个输出文件的 { name, path }
- 便捷字段:
- download_url(字符串)如果只有一个输出文件
- download_urls(字符串数组)所有输出文件的下载链接
输出示例:
json
{
job_id: 789,
status: done,
outputs: [
{ name: file1.pdf, path: https://.../file1.pdf },
{ name: file2.pdf, path: https://.../file2.pdf },
{ name: converted.zip, path: https://.../converted.zip }
],
download_urls: [
https://.../file1.pdf,
https://.../file2.pdf,
https://.../converted.zip
],
input_files: [file1.docx, file2.pptx]
}