haibersut / claude-web Goto Github PK
View Code? Open in Web Editor NEW一个基于 Python 用于和 Claude Web API 进行交互的程序
License: Apache License 2.0
一个基于 Python 用于和 Claude Web API 进行交互的程序
License: Apache License 2.0
POST https://claude.ai/api/convert_document HTTP/1.1
'Host': 'claude.ai'
Connection: keep-alive
Content-Length: xxxxxxxxx
sec-ch-ua: xxxxxx
sec-ch-ua-platform: "Windows"
sec-ch-ua-mobile: ?0
User-Agent: xxxxxxx
'Content-Type: multipart/form-data'; boundary=----xxxxx
'Accept': '/',
'Origin': 'https://claude.ai',
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
'Referer': 'https://claude.ai/chats',
'Accept-Encoding': 'gzip, deflate, br',
Accept-Language: xxxxxxx
Cookie: sessionKey=xxxx
------xxxxxx
Content-Disposition: form-data; name="file"; filename="test.pdf"
Content-Type: application/pdf
(下面是PDF的内容)
HTTP/1.1 200 OK
Date: xxxxxxx
Content-Type: application/json
Connection: keep-alive
strict-transport-security: max-age=xxxx; includeSubDomains; preload
x-xss-protection: 1; mode=block
x-frame-options: xxxx
x-content-type-options: nosniff
content-security-policy: xxxxxxx
vary: RSC, Next-Router-State-Tree, Next-Router-Prefetch, Accept-Encoding
Cache-Control: private
Via: 1.1 google
CF-Cache-Status: DYNAMIC
Set-Cookie: xxxxxxxxx
Server: cloudflare
CF-RAY: xxxxxx
Content-Length: xxxxxx
{"file_name":"test.pdf","file_size":xxxxx,"file_type":"pdf","extracted_content":"PDF文件中的文字内容.","totalPages":xxxxx}
其实可以自行解析构造即可,返回的内容会被加入到"attachments": []
中,然后跟随文本一起请求。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.