{"id":29154,"date":"2025-02-19T22:15:39","date_gmt":"2025-02-19T14:15:39","guid":{"rendered":"https:\/\/www.aisharenet.com\/?p=29154"},"modified":"2025-03-19T22:26:04","modified_gmt":"2025-03-19T14:26:04","slug":"genspark2api","status":"publish","type":"post","link":"https:\/\/www.kdjingpai.com\/en\/genspark2api\/","title":{"rendered":"Genspark2api\uff08\u5931\u6548\uff09"},"content":{"rendered":"<p>genspark2api \u662f\u4e00\u4e2a\u5f00\u6e90\u7684 API \u670d\u52a1\u5de5\u5177\uff0c\u6258\u7ba1\u5728 GitHub \u4e0a\uff0c\u7531\u5f00\u53d1\u8005 deanxv \u521b\u5efa\u3002\u5b83\u63d0\u4f9b\u4e86\u4e00\u4e2a\u652f\u6301\u591a\u6a21\u578b\u5bf9\u8bdd\u3001\u6587\u751f\u56fe\u548c\u6587\u751f\u89c6\u9891\u7684\u63a5\u53e3\u670d\u52a1\uff0c\u7528\u6237\u53ef\u4ee5\u901a\u8fc7 Docker \u5feb\u901f\u90e8\u7f72\u5728\u672c\u5730\u6216\u670d\u52a1\u5668\u4e0a\u3002\u8fd9\u4e2a\u5de5\u5177\u7684\u6838\u5fc3\u529f\u80fd\u662f\u8ba9\u5f00\u53d1\u8005\u8f7b\u677e\u8c03\u7528\u591a\u79cd\u5bf9\u8bdd\u6a21\u578b\uff08\u5982 gpt-4o\u3001claude-3-5-sonnet\uff09\u548c\u751f\u6210\u5de5\u5177\uff08\u5982 flux\u3001dall-e-3\uff09\uff0c\u652f\u6301\u8054\u7f51\u641c\u7d22\u548c\u56fe\u7247\u8bc6\u522b\u7b49\u591a\u8f6e\u5bf9\u8bdd\u3002\u9879\u76ee\u7248\u672c\u76ee\u524d\u4e3a 3.4\uff0c\u4ee3\u7801\u5b8c\u5168\u516c\u5f00\uff0c\u7528\u6237\u53ef\u4ee5\u81ea\u7531\u4fee\u6539\u3002\u5b83\u7684\u8bbe\u8ba1\u76ee\u6807\u662f\u7b80\u5316\u5f00\u53d1\u6d41\u7a0b\uff0c\u9002\u5408\u6280\u672f\u7231\u597d\u8005\u6216\u5c0f\u578b\u56e2\u961f\u4f7f\u7528\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>\u529f\u80fd\u5217\u8868<\/h2>\n<ul>\n<li>\u652f\u6301\u591a\u79cd\u5bf9\u8bdd\u6a21\u578b\u63a5\u53e3\uff08\u6d41\u5f0f\u548c\u975e\u6d41\u5f0f\uff09\uff0c\u5982\u00a0<code>gpt-4o<\/code>\u3001<code>claude-3-5-sonnet<\/code>\uff0c\u672a\u652f\u6301\u6a21\u578b\u4f1a\u81ea\u52a8\u5207\u6362\u5230 Mixture-of-Agents \u6a21\u5f0f\u3002<\/li>\n<li>\u63d0\u4f9b\u8054\u7f51\u641c\u7d22\u529f\u80fd\uff0c\u5728\u6a21\u578b\u540d\u540e\u52a0\u00a0<code>-search<\/code>\u00a0\u5373\u53ef\u4f7f\u7528\uff0c\u4f8b\u5982\u00a0<code>gpt-4o-search<\/code>\u3002<\/li>\n<li>\u652f\u6301\u56fe\u7247\u548c\u6587\u4ef6\u8bc6\u522b\u7684\u591a\u8f6e\u5bf9\u8bdd\uff0c\u7528\u6237\u53ef\u4ee5\u4e0a\u4f20\u5185\u5bb9\u8fdb\u884c\u4ea4\u4e92\u3002<\/li>\n<li>\u63d0\u4f9b\u6587\u751f\u56fe\u63a5\u53e3\u00a0<code>\/images\/generations<\/code>\uff0c\u652f\u6301\u6a21\u578b\u5982\u00a0<code><a href=\"https:\/\/www.kdjingpai.com\/manxuebanflux1chan\/\">flux<\/a><\/code>\u3001<code>dall-e-3<\/code>\u3002<\/li>\n<li>\u652f\u6301\u6587\u751f\u89c6\u9891\u548c\u56fe\u751f\u89c6\u9891\u63a5\u53e3\u00a0<code>\/videos\/generations<\/code>\uff0c\u53ef\u7528\u6a21\u578b\u5305\u62ec\u00a0<code>kling\/v1.6\/standard<\/code>\u3002<\/li>\n<li>\u901a\u8fc7 cookie \u6c60\u548c\u81ea\u52a8\u91cd\u8bd5\u673a\u5236\u63d0\u5347\u670d\u52a1\u7a33\u5b9a\u6027\u3002<\/li>\n<li>\u652f\u6301\u81ea\u5b9a\u4e49\u63a5\u53e3\u5bc6\u94a5\uff08<code>API_SECRET<\/code>\uff09\u548c\u4ee3\u7406\u914d\u7f6e\uff08<code>PROXY_URL<\/code>\uff09\u3002<\/li>\n<li>\u5141\u8bb8\u7ed1\u5b9a\u6a21\u578b\u548c\u5bf9\u8bdd\uff0c\u9632\u6b62\u6a21\u578b\u5207\u6362\u5bfc\u81f4\u54cd\u5e94\u8d28\u91cf\u4e0b\u964d\u3002<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>\u4f7f\u7528\u5e2e\u52a9<\/h2>\n<h3>\u5b89\u88c5\u6d41\u7a0b<\/h3>\n<p>genspark2api \u4f9d\u8d56 Docker \u90e8\u7f72\uff0c\u9002\u5408\u6709\u57fa\u7840\u6280\u672f\u80fd\u529b\u7684\u7528\u6237\u3002\u4ee5\u4e0b\u662f\u8be6\u7ec6\u6b65\u9aa4\uff1a<\/p>\n<ol>\n<li><strong>\u5b89\u88c5 Docker<\/strong><br \/>\n\u5728\u7535\u8111\u6216\u670d\u52a1\u5668\u4e0a\u5b89\u88c5 Docker\u3002\u8bbf\u95ee\u00a0<code>https:\/\/www.docker.com\/<\/code>\u00a0\u4e0b\u8f7d\u5e76\u5b89\u88c5\u3002\u5b89\u88c5\u540e\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u786e\u8ba4\uff1a<\/li>\n<\/ol>\n<pre><code>docker --version\r\n<\/code><\/pre>\n<p>\u5982\u679c\u663e\u793a\u7248\u672c\u53f7\uff0c\u8bf4\u660e\u73af\u5883\u5c31\u7eea\u3002<\/p>\n<ol start=\"2\">\n<li><strong>\u62c9\u53d6\u955c\u50cf<\/strong><br \/>\n\u5728\u7ec8\u7aef\u8f93\u5165\u547d\u4ee4\u62c9\u53d6\u6700\u65b0\u955c\u50cf\uff1a<\/li>\n<\/ol>\n<pre><code>docker pull deanxv\/genspark2api:latest\r\n<\/code><\/pre>\n<p>\u5982\u679c\u62c9\u53d6\u5931\u8d25\uff0c\u53ef\u7528 GitHub \u955c\u50cf\uff1a<\/p>\n<pre><code>docker pull ghcr.io\/deanxv\/genspark2api:latest\r\n<\/code><\/pre>\n<ol start=\"3\">\n<li><strong>\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/strong><br \/>\n\u521b\u5efa\u4e00\u4e2a\u672c\u5730\u6587\u4ef6\u5939\uff08\u5982\u00a0<code>.\/data<\/code>\uff09\u5b58\u50a8\u6570\u636e\u3002\u51c6\u5907\u4ee5\u4e0b\u53d8\u91cf\uff1a<\/li>\n<\/ol>\n<ul>\n<li><code>GS_COOKIE<\/code>\uff1a\u4ece <a href=\"https:\/\/www.kdjingpai.com\/genspark\/\">genspark<\/a> \u5b98\u7f51\u83b7\u53d6\u7684 cookie\uff0c\u591a\u4e2a\u7528\u9017\u53f7\u5206\u9694\u3002<\/li>\n<li><code>API_SECRET<\/code>\uff1a\u81ea\u5b9a\u4e49\u5bc6\u94a5\uff0c\u5982 &#8220;123456&#8221;\uff0c\u7528\u4e8e\u63a5\u53e3\u5b89\u5168\u6821\u9a8c\u3002<\/li>\n<li><code>TZ<\/code>\uff1a\u65f6\u533a\uff0c\u5982 &#8220;Asia\/Shanghai&#8221;\u3002<br \/>\n\u793a\u4f8b\u8fd0\u884c\u547d\u4ee4\uff1a<\/li>\n<\/ul>\n<pre><code>docker run --name genspark2api -d --restart always \r\n-p 7055:7055 \r\n-v .\/data:\/app\/genspark2api\/data \r\n-e GS_COOKIE=\"session_id=\u4f60\u7684cookie\" \r\n-e API_SECRET=\"123456\" \r\n-e TZ=\"Asia\/Shanghai\" \r\ndeanxv\/genspark2api:latest\r\n<\/code><\/pre>\n<ol start=\"4\">\n<li><strong>\u542f\u52a8\u5e76\u9a8c\u8bc1<\/strong><br \/>\n\u8fd0\u884c\u540e\uff0c\u8bbf\u95ee\u00a0<code>http:\/\/localhost:7055<\/code>\u00a0\u68c0\u67e5\u670d\u52a1\u72b6\u6001\u3002\u5982\u679c\u9700\u8981\u67e5\u770b\u65e5\u5fd7\uff1a<\/li>\n<\/ol>\n<pre><code>docker logs genspark2api\r\n<\/code><\/pre>\n<h3>\u83b7\u53d6 cookie<\/h3>\n<ol>\n<li>\u6253\u5f00\u6d4f\u89c8\u5668\uff0c\u6309 F12 \u8fdb\u5165\u5f00\u53d1\u8005\u5de5\u5177\u3002<\/li>\n<li>\u8bbf\u95ee\u00a0<code>https:\/\/www.genspark.ai<\/code>\uff0c\u53d1\u8d77\u4e00\u6b21\u5bf9\u8bdd\u3002<\/li>\n<li>\u5728\u201c\u7f51\u7edc\u201d\u9009\u9879\u5361\u4e2d\u627e\u5230\u00a0<code>ask<\/code>\u00a0\u8bf7\u6c42\uff0c\u590d\u5236\u8bf7\u6c42\u5934\u4e2d\u7684\u00a0<code>cookie<\/code>\u00a0\u503c\u3002<br \/>\n\u5fc5\u987b\u5305\u542b\u00a0<code>session_id=xxx<\/code>\uff0c\u5176\u4ed6\u90e8\u5206\u53ef\u9009\u3002<\/li>\n<\/ol>\n<h3>\u4f7f\u7528\u5bf9\u8bdd\u63a5\u53e3<\/h3>\n<p>\u5bf9\u8bdd\u63a5\u53e3\u8def\u5f84\u4e3a\u00a0<code>\/chat\/completions<\/code>\uff0c\u652f\u6301\u6d41\u5f0f\u548c\u975e\u6d41\u5f0f\u8f93\u51fa\u3002<\/p>\n<ul>\n<li><strong>\u8bf7\u6c42\u793a\u4f8b<\/strong>\uff08\u975e\u6d41\u5f0f\uff09\uff1a<\/li>\n<\/ul>\n<pre><code>curl -X POST http:\/\/localhost:7055\/chat\/completions \r\n-H \"Authorization: Bearer 123456\" \r\n-H \"Content-Type: application\/json\" \r\n-d '{\"model\": \"gpt-4o\", \"messages\": [{\"role\": \"user\", \"content\": \"\u4f60\u597d\"}]}'\r\n<\/code><\/pre>\n<ul>\n<li><strong>\u6d41\u5f0f\u8f93\u51fa<\/strong>\uff1a\u6dfb\u52a0\u00a0<code>\"stream\": true<\/code>\uff0c\u6570\u636e\u4f1a\u5206\u5757\u8fd4\u56de\u3002<\/li>\n<li><strong>\u8fd4\u56de\u793a\u4f8b<\/strong>\uff1a<\/li>\n<\/ul>\n<pre><code>{\"choices\": [{\"message\": {\"role\": \"assistant\", \"content\": \"\u4f60\u597d\uff01\u6709\u4ec0\u4e48\u53ef\u4ee5\u5e2e\u52a9\u4f60\u7684\u5417\uff1f\"}}]}\r\n<\/code><\/pre>\n<h3>\u4f7f\u7528\u6587\u751f\u56fe\u63a5\u53e3<\/h3>\n<p>\u8def\u5f84\u4e3a\u00a0<code>\/images\/generations<\/code>\uff0c\u652f\u6301\u751f\u6210\u56fe\u7247\u3002<\/p>\n<ul>\n<li><strong>\u8bf7\u6c42\u793a\u4f8b<\/strong>\uff1a<\/li>\n<\/ul>\n<pre><code>curl -X POST http:\/\/localhost:7055\/images\/generations \r\n-H \"Authorization: Bearer 123456\" \r\n-H \"Content-Type: application\/json\" \r\n-d '{\"model\": \"flux\", \"prompt\": \"\u4e00\u53ea\u732b\u5728\u8349\u5730\u4e0a\u73a9\u800d\"}'\r\n<\/code><\/pre>\n<ul>\n<li><strong>\u8fd4\u56de\u793a\u4f8b<\/strong>\uff1a<\/li>\n<\/ul>\n<pre><code>{\"data\": [{\"url\": \"https:\/\/example.com\/image.jpg\"}]}\r\n<\/code><\/pre>\n<h3>\u4f7f\u7528\u6587\u751f\u89c6\u9891\u63a5\u53e3<\/h3>\n<p>\u8def\u5f84\u4e3a\u00a0<code>\/videos\/generations<\/code>\uff0c\u652f\u6301\u6587\u672c\u6216\u56fe\u7247\u751f\u6210\u89c6\u9891\u3002<\/p>\n<ul>\n<li><strong>\u8bf7\u6c42\u793a\u4f8b<\/strong>\uff08\u6587\u672c\u751f\u6210\uff09\uff1a<\/li>\n<\/ul>\n<pre><code>curl -X POST http:\/\/localhost:7055\/videos\/generations \r\n-H \"Authorization: Bearer 123456\" \r\n-H \"Content-Type: application\/json\" \r\n-d '{\"model\": \"kling\/v1.6\/standard\", \"prompt\": \"\u57ce\u5e02\u591c\u666f\", \"aspect_ratio\": \"16:9\", \"duration\": 10, \"auto_prompt\": true}'\r\n<\/code><\/pre>\n<ul>\n<li><strong>\u8fd4\u56de\u793a\u4f8b<\/strong>\uff1a<\/li>\n<\/ul>\n<pre><code>{\"created\": 1677664796, \"data\": [{\"url\": \"https:\/\/example.com\/video.mp4\"}]}\r\n<\/code><\/pre>\n<h3>\u914d\u7f6e ReCaptcha \u9a8c\u8bc1<\/h3>\n<p>\u5b98\u65b9\u8981\u6c42\u901a\u8fc7 ReCaptchaV3 \u9a8c\u8bc1\uff0c\u5426\u5219\u6a21\u578b\u53ef\u80fd\u964d\u667a\u6216\u751f\u6210\u5f02\u5e38\u3002\u9700\u8981\u914d\u5408\u00a0<code>genspark-playwright-proxy<\/code>\u00a0\u670d\u52a1\uff1a<\/p>\n<ol>\n<li>\u90e8\u7f72\u4ee3\u7406\u670d\u52a1\uff1a<\/li>\n<\/ol>\n<pre><code>docker run --name genspark-playwright-proxy -d --restart always \r\n-p 7022:7022 \r\n-v .\/data:\/app\/genspark-playwright-proxy\/data \r\n-e TZ=\"Asia\/Shanghai\" \r\ndeanxv\/genspark-playwright-proxy:latest\r\n<\/code><\/pre>\n<ol start=\"2\">\n<li>\u5728 genspark2api \u4e2d\u6dfb\u52a0\u73af\u5883\u53d8\u91cf\uff1a<\/li>\n<\/ol>\n<pre><code>-e RECAPTCHA_PROXY_URL=\"http:\/\/127.0.0.1:7022\"\r\n<\/code><\/pre>\n<ol start=\"3\">\n<li>\u91cd\u542f\u670d\u52a1\u751f\u6548\u3002<\/li>\n<\/ol>\n<h3>\u5e38\u89c1\u95ee\u9898\u89e3\u51b3<\/h3>\n<ul>\n<li><strong>\u63a5\u53e3\u8fd4\u56de &#8220;All cookies are temporarily unavailable&#8221;<\/strong><br \/>\n\u6240\u6709 cookie \u8fbe\u5230\u901f\u7387\u9650\u5236\u3002\u66f4\u6362\u65b0\u7684\u00a0<code>GS_COOKIE<\/code>\u00a0\u6216\u7b49\u5f85\u4e00\u6bb5\u65f6\u95f4\u3002<\/li>\n<li><strong>\u9047\u5230 Cloudflare \u62e6\u622a<\/strong><br \/>\n\u914d\u7f6e\u00a0<code>PROXY_URL<\/code>\uff0c\u5982\u00a0<code>-e PROXY_URL=\"http:\/\/127.0.0.1:10801\"<\/code>\u3002<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>\u5e94\u7528\u573a\u666f<\/h2>\n<ol>\n<li><strong>\u5f00\u53d1\u667a\u80fd\u5ba2\u670d<\/strong><br \/>\n\u901a\u8fc7\u5bf9\u8bdd\u63a5\u53e3\u5feb\u901f\u642d\u5efa\u5ba2\u670d\u673a\u5668\u4eba\uff0c\u652f\u6301\u8054\u7f51\u641c\u7d22\u548c\u591a\u8f6e\u5bf9\u8bdd\uff0c\u56de\u7b54\u5ba2\u6237\u95ee\u9898\u3002<\/li>\n<li><strong>\u751f\u6210\u521b\u610f\u5185\u5bb9<\/strong><br \/>\n\u4f7f\u7528\u6587\u751f\u56fe\u548c\u6587\u751f\u89c6\u9891\u529f\u80fd\uff0c\u8f93\u5165\u63cf\u8ff0\u751f\u6210\u56fe\u7247\u6216\u77ed\u89c6\u9891\uff0c\u7528\u4e8e\u8bbe\u8ba1\u539f\u578b\u6216\u793e\u4ea4\u5a92\u4f53\u5185\u5bb9\u3002<\/li>\n<li><strong>\u6559\u80b2\u548c\u6280\u672f\u5b66\u4e60<\/strong><br \/>\n\u5b66\u751f\u6216\u5f00\u53d1\u8005\u53ef\u4ee5\u90e8\u7f72\u670d\u52a1\uff0c\u8c03\u7528\u4e0d\u540c\u6a21\u578b\u8fdb\u884c\u5b9e\u9a8c\uff0c\u5b66\u4e60 API \u548c\u6a21\u578b\u96c6\u6210\u3002<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h2>QA<\/h2>\n<ol>\n<li><strong>\u652f\u6301\u54ea\u4e9b\u5bf9\u8bdd\u6a21\u578b\uff1f<\/strong><br \/>\n\u652f\u6301\u00a0<code>gpt-4o<\/code>\u3001<code>claude-3-5-sonnet<\/code>\u00a0\u7b49\u591a\u79cd\u6a21\u578b\uff0c\u672a\u5217\u51fa\u6a21\u578b\u4f1a\u89e6\u53d1 Mixture-of-Agents \u6a21\u5f0f\u3002<\/li>\n<li><strong>\u6587\u751f\u56fe\u5931\u8d25\u600e\u4e48\u529e\uff1f<\/strong><br \/>\n\u68c0\u67e5\u00a0<code>RECAPTCHA_PROXY_URL<\/code>\u00a0\u662f\u5426\u914d\u7f6e\u6b63\u786e\uff0c\u786e\u4fdd\u901a\u8fc7 ReCaptchaV3 \u9a8c\u8bc1\u3002<\/li>\n<li><strong>\u5982\u4f55\u63d0\u5347\u670d\u52a1\u7a33\u5b9a\u6027\uff1f<\/strong><br \/>\n\u914d\u7f6e\u591a\u4e2a\u00a0<code>GS_COOKIE<\/code>\uff0c\u542f\u7528 cookie \u6c60\uff0c\u8bf7\u6c42\u5931\u8d25\u65f6\u81ea\u52a8\u5207\u6362\u3002<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>genspark2api \u662f\u4e00\u4e2a\u5f00\u6e90\u7684 API \u670d\u52a1\u5de5\u5177\uff0c\u6258\u7ba1\u5728 GitHub \u4e0a\uff0c\u7531\u5f00\u53d1\u8005 deanxv \u521b\u5efa\u3002\u5b83\u63d0\u4f9b\u4e86\u4e00\u4e2a\u652f\u6301\u591a\u6a21\u578b\u5bf9\u8bdd\u3001\u6587\u751f\u56fe\u548c\u6587\u751f\u89c6\u9891\u7684\u63a5\u53e3\u670d\u52a1\uff0c\u7528\u6237\u53ef\u4ee5\u901a\u8fc7 Docker \u5feb\u901f\u90e8\u7f72\u5728\u672c\u5730\u6216\u670d\u52a1\u5668\u4e0a\u3002\u8fd9\u4e2a\u5de5\u5177\u7684\u6838\u5fc3\u529f&#8230;<\/p>\n","protected":false},"author":1,"featured_media":61861,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[230,255],"class_list":["post-29154","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tool","tag-aikaiyuanxiangmu","tag-mianfeidamoxingapi"],"_links":{"self":[{"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/posts\/29154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/comments?post=29154"}],"version-history":[{"count":0,"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/posts\/29154\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/media\/61861"}],"wp:attachment":[{"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/media?parent=29154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/categories?post=29154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/tags?post=29154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}