1. OpenAi接口
AiXor文档
  • 操作指南
  • 常见问题
  • 当前订阅套餐模型倍率
  • OpenClaw接入教程
  • OpenClaw一键脚本接入教程
  • Claude Code 安装接入教程
  • Codex安装接入教程
  • VScode安装Claudecode教程
  • Chatbox接入教程
  • Cherry studio接入教程
  • gpt-image-2使用教程
  • OpenAi接口
    • 文本生成
      POST
    • 文本生成 - 上下文阅读
      POST
    • 图片理解
      POST
    • 图片生成(gpt-image-1/sora_image/flux-kontext-pro)
      POST
    • 图片编辑 - edits
      POST
    • 图片编辑 - 网页版
      POST
    • 函数调用 - tools
      POST
    • v1/Responses - 通用
      POST
    • 内容补全接口
      POST
    • 创建内容审核
      POST
    • PDF文件分析
      POST
    • 深度研究 - Deep-research
      POST
    • 联网搜索 - Web search
      POST
    • response_format
      POST
  • Authropic Claude接口
    • OpenAi兼容接口
      • 文本生成
      • 文本生成 - 强制返回思考 Copy
      • 函数调用
      • 图片理解
      • 联网搜索 - Web search
    • 文本生成
      POST
    • 图片理解
      POST
    • 文本生成 - 强制返回思考
      POST
    • 函数调用
      POST
    • 联网搜索 - Web search
      POST
    • 文本生成 - 思考配置
      POST
    • PDF传输
      POST
  • Google Gemini接口
  • 疑难问题
    • Codex
    • Claude Code
    • OpenClaw
    • API
  1. OpenAi接口

PDF文件分析

POST
/v1/chat/completions
PDF转成base64替换到${base64String},以官方文档为准:https://developers.openai.com/api/docs/guides/pdf-files

请求参数

Header 参数

Body 参数application/json必填

示例
{
    "model": "gpt-5.2",
    "input": [
        {
            "role": "user",
            "content": [
                {
                    "type": "input_file",
                    "filename": "draconomicon.pdf",
                    "file_data": "data:application/pdf;base64,..."
                },
                {
                    "type": "input_text",
                    "text": "What is the first dragon in the book?"
                }
            ]
        }
    ]
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location 'https://aixor.org/v1/chat/completions' \
--header 'Accept: application/json' \
--header 'Authorization: sk-' \
--header 'Content-Type: application/json' \
--data '{
    "model": "gpt-5.2",
    "input": [
        {
            "role": "user",
            "content": [
                {
                    "type": "input_file",
                    "filename": "draconomicon.pdf",
                    "file_data": "data:application/pdf;base64,..."
                },
                {
                    "type": "input_text",
                    "text": "What is the first dragon in the book?"
                }
            ]
        }
    ]
}'

返回响应

🟢200成功
application/json
Bodyapplication/json

示例
{
    "id": "string",
    "object": "string",
    "created": 0,
    "choices": [
        {
            "index": 0,
            "message": {
                "role": "string",
                "content": "string"
            },
            "finish_reason": "string"
        }
    ],
    "usage": {
        "prompt_tokens": 0,
        "completion_tokens": 0,
        "total_tokens": 0
    }
}
修改于 2026-03-17 08:55:57
上一页
创建内容审核
下一页
深度研究 - Deep-research
Built with