Exocore AI Gateway
Unified REST API for Gemini, Claude, DeepSeek, Qwen, and Meta AI — all behind a single server powered by @exocore/multi.
Gemini API
Cookie-based proxy to Google Gemini — multi-turn chat, file uploads, and session management.
curl "/api/gemini/health"
curl "/api/gemini/cookies"
Replace the cookie jar with a fresh raw cookie string. The server parses, saves, and re-initializes the Gemini client.
| Field | Type | Required | Description |
|---|---|---|---|
| body | string | Required | Raw cookie string SID=x; HSID=y; ... |
curl -X POST "/api/gemini/cookies" \ -H "Content-Type: text/plain" \ --data-raw "SID=abc; HSID=xyz; ..."
curl -X DELETE "/api/gemini/cookies"
Sends a text prompt to Gemini. Supports multi-turn with cid, rid, rcid params.
| Param | Type | Req | Description |
|---|---|---|---|
| ask | string | Required* | Text prompt |
| upload | string | Opt | File URLs to attach |
| cid | string | Opt | Conversation ID |
| rid | string | Opt | Response ID |
| rcid | string | Opt | Candidate ID |
| model | string | Opt | fast, thinking, or pro (default: fast) |
| tokens | bool | Opt | Stream tokens as SSE (true) |
| delete | bool | Opt | Auto-delete conversation after reply |
curl "/api/gemini/chat?ask=What+is+the+capital+of+France"
Multi-turn IDs (optional)
Truly temporary Gemini chat — no cookies, no auth required. Sessions are ephemeral.
curl "/api/gemini/temp/chat?ask=Hello"
Conversations
curl "/api/gemini/conversations"
curl -X DELETE "/api/gemini/conversations"
curl -X DELETE "/api/gemini/conversations/<id>"
DeepSeek API
Token-based client for DeepSeek chat. Configure via deepseek.json with userToken and hifLeim fields.
curl "/api/deepseek/health"
Sends a message to DeepSeek via GET query. Auto-creates session if sessionId omitted.
| Param | Type | Req | Description |
|---|---|---|---|
| prompt | string | Req | Your message |
| sessionId | string | Opt | Resume existing session |
| thinkingEnabled | bool | Opt | Enable reasoning |
| searchEnabled | bool | Opt | Enable web search |
| delete | bool | Opt | Auto-delete session after reply |
| tokens | bool | Opt | Stream tokens as SSE (true) |
curl "/api/deepseek/chat?prompt=Hello"
Same as GET but with JSON body.
curl -X POST "/api/deepseek/chat" \ -H "Content-Type: application/json" \ --data '{"prompt":"Hello"}'
Sessions
curl "/api/deepseek/sessions?limit=20"
curl -X POST "/api/deepseek/sessions"
curl -X DELETE "/api/deepseek/sessions"
curl -X DELETE "/api/deepseek/sessions/<id>"
curl "/api/deepseek/sessions/<id>/messages"
Send a message to an existing session.
curl -X POST "/api/deepseek/sessions/<id>/chat" \ -H "Content-Type: application/json" \ --data '{"prompt":"Hello again"}'
Regenerate an assistant response for a given message.
curl -X POST "/api/deepseek/sessions/<id>/regenerate/<msgId>"
Edit a user message and re-generate the response.
curl -X POST "/api/deepseek/sessions/<id>/edit/<msgId>" \ -H "Content-Type: application/json" \ --data '{"prompt":"edited text"}'
Continue generating from a partial assistant response.
curl -X POST "/api/deepseek/sessions/<id>/continue/<msgId>"
Stop an in-progress streaming response.
curl -X POST "/api/deepseek/sessions/<id>/stop/<msgId>"
curl -X PUT "/api/deepseek/sessions/<id>/title" \ -H "Content-Type: application/json" \ --data '{"title":"My Chat"}'
curl -X PUT "/api/deepseek/sessions/<id>/pinned" \ -H "Content-Type: application/json" \ --data '{"pinned":true}'
User & PoW
curl "/api/deepseek/user"
Request a PoW challenge for a target endpoint.
| Param | Type | Req | Description |
|---|---|---|---|
| target | string | Opt | Default /api/v0/chat/completion |
curl "/api/deepseek/pow-challenge"
Solve a PoW challenge and get the answer.
curl -X POST "/api/deepseek/pow-solve" \ -H "Content-Type: application/json" \ --data '{"challenge":"...","difficulty":...}'
Shares
curl "/api/deepseek/shares"
curl -X POST "/api/deepseek/shares" \ -H "Content-Type: application/json" \ --data '{"sessionId":"...","messageIds":["..."]}'
Fork a shared conversation into a new session.
curl -X POST "/api/deepseek/shares/fork" \ -H "Content-Type: application/json" \ --data '{"shareId":"..."}'
curl -X DELETE "/api/deepseek/shares/<id>"
Qwen API
Token-based client for Qwen AI chat. Configure via qwen.json cookies file with a token entry.
curl "/api/qwen"
curl "/api/qwen/health"
Send a prompt to Qwen via GET. Supports modes: normal, thinking, fast. Use chat_type for features: slides, travel, learn, deep_research, web_dev, search, artifacts.
| Param | Type | Req | Description |
|---|---|---|---|
| prompt | string | Req | Your message |
| mode | string | Opt | normal, thinking, or fast |
| image_url | string | Opt | URL for vision queries |
| chat_type | string | Opt | Feature: slides, travel, deep_research, etc. |
| model | string | Opt | Override model name |
| delete | bool | Opt | Auto-delete all conversations after reply |
| tokens | bool | Opt | Stream tokens as SSE (true) |
curl "/api/qwen/ask?prompt=Hello&mode=fast"
POST version with JSON body. Supports file attachments via file_path.
curl -X POST "/api/qwen/ask" \ -H "Content-Type: application/json" \ --data '{"prompt":"Hello","mode":"fast","chat_type":"slides"}'
Features
curl "/api/qwen/ask?prompt=3+slides+about+AI&chat_type=slides"
curl "/api/qwen/ask?prompt=Tokyo+itinerary&chat_type=travel"
curl "/api/qwen/ask?prompt=explain+quantum&chat_type=learn"
curl "/api/qwen/ask?prompt=climate+change+effects&chat_type=deep_research"
curl "/api/qwen/ask?prompt=React+component&chat_type=web_dev"
curl "/api/qwen/ask?prompt=latest+tech+news&chat_type=search"
curl "/api/qwen/ask?prompt=draw+an+SVG+logo&chat_type=artifacts"
curl "/api/qwen/ask?prompt=calculator+tool&chat_type=tools"
curl "/api/qwen/ask?prompt=Python+fibonacci&chat_type=code"
curl "/api/qwen/ask?prompt=design+a+UI+sketch&chat_type=drawing"
curl "/api/qwen/ask?prompt=you+are+a+detective&chat_type=roleplay"
Files & Conversations
Upload a file as base64 content.
curl -X POST "/api/qwen/upload" \ -H "Content-Type: application/json" \ --data '{"content":"aGVsbG8=","filename":"hello.txt"}'
Retrieve an uploaded file by filename.
curl "/api/qwen/uploads/<filename>"
curl "/api/qwen/conversations"
curl -X DELETE "/api/qwen/conversations"
curl -X DELETE "/api/qwen/conversations/<id>"
Kimi API
Token-based client for Kimi AI chat. Configure via kimi.json cookies file with a kimi-auth cookie entry (JWT token).
curl "/api/kimi/health"
curl "/api/kimi/user"
curl "/api/kimi/models"
Chat
Params: prompt (req), sessionId, thinking, delete (Auto-delete session after reply).
curl "/api/kimi/chat?prompt=Hello"
Send message via POST with JSON body.
curl -X POST "/api/kimi/chat" \ -H "Content-Type: application/json" \ --data '{"prompt":"Hello"}'
Sessions
curl "/api/kimi/sessions"
curl -X POST "/api/kimi/sessions" \ -H "Content-Type: application/json" \ --data '{"name":"My Chat"}'
curl "/api/kimi/sessions/<id>"
curl "/api/kimi/sessions/<id>/messages"
Send message to an existing session.
curl -X POST "/api/kimi/chat/<id>" \ -H "Content-Type: application/json" \ --data '{"prompt":"Hello"}'
curl -X PUT "/api/kimi/sessions/<id>" \ -H "Content-Type: application/json" \ --data '{"chat":{"name":"New Name"}}'
curl -X DELETE "/api/kimi/sessions/<id>"
curl -X DELETE "/api/kimi/sessions"
Kimi+
curl "/api/kimi/kimiplus"
curl "/api/kimi/kimiplus/<id>"
Other
curl -X POST "/api/kimi/cancel/<chatId>/<messageId>"
curl -X POST "/api/kimi/vote/<chatId>/<messageId>" \ -H "Content-Type: application/json" \ --data '{"voteType":"upvote"}'
Claude API
Free Claude access via Puter's driver API. Configure an auth_token in data/claude.json.
curl "/api/claude/health"
curl "/api/claude/models"
Chat
Query params: ask (required), model (optional, default: claude-sonnet-4-6).
curl "/api/claude/chat?ask=Hello"
Send messages array with optional streaming. Body: { messages, model?, stream?, max_tokens? }.
curl -X POST "/api/claude/chat" \ -H "Content-Type: application/json" \ --data '{"messages":[{"role":"user","content":"Hello"}],"model":"claude-sonnet-4-6"}'
Available Models
V1 / Anthropic-compatible
Claude also supports the /v1/messages endpoint with Anthropic-style model names — the gateway maps them to Puter driver models automatically.
Anthropic Message API format. Model names like claude-sonnet-4-20250514, claude-opus-4-7 are mapped automatically.
curl -X POST "/v1/messages" \ -H "Content-Type: application/json" \ --data '{"model":"claude-sonnet-4-20250514","messages":[{"role":"user","content":"Hello"}],"max_tokens":1024}'
GPT API
Free GPT access via Puter's driver API. Configure an auth_token in data/gpt.json (can reuse data/claude.json token).
curl "/api/gpt/health"
curl "/api/gpt/models"
Chat
Query params: ask (required), model (optional, default: gpt-4o).
curl "/api/gpt/chat?ask=Hello"
Send messages array with optional streaming. Body: { messages, model?, stream?, max_tokens? }.
curl -X POST "/api/gpt/chat" \ -H "Content-Type: application/json" \ --data '{"messages":[{"role":"user","content":"Hello"}],"model":"gpt-4o"}'
Available Models
Grok API
Free Grok access via Puter's driver API. Configure an auth_token in data/grok.json (can reuse data/claude.json token).
curl "/api/grok/health"
curl "/api/grok/models"
Chat
Query params: ask (required), model (optional, default: grok-3).
curl "/api/grok/chat?ask=Hello"
Send messages array with optional streaming. Body: { messages, model?, stream?, max_tokens? }.
curl -X POST "/api/grok/chat" \ -H "Content-Type: application/json" \ --data '{"messages":[{"role":"user","content":"Hello"}],"model":"grok-3"}'
Available Models
Meta AI API
Cookie-based proxy to Meta AI (Llama). Requires ecto_1_sess and datr cookies in data/meta.json.
curl "/api/meta/health"
curl "/api/meta/models"
Chat
Query params: ask (required). Optionally delete=true to auto-delete conversation.
curl "/api/meta/chat?ask=Hello"
Send messages array. Body: { messages, model? }.
curl -X POST "/api/meta/chat" \ -H "Content-Type: application/json" \ --data '{"messages":[{"role":"user","content":"Hello"}]}'
Image Generation
Query params: prompt (required), orientation (optional: VERTICAL, HORIZONTAL, SQUARE).
curl "/api/meta/image?prompt=a+cat&orientation=SQUARE"
Video Generation
Query params: prompt (required). Video generation is async — returns a processing status.
curl "/api/meta/video?prompt=a+cat+playing"
Available Models
V1 API
Unified OpenAI-compatible /v1/chat/completions endpoint that routes to any provider. All models are mapped automatically — just set the model field in your request body.
Available Models
Pass any model ID from the list above in the model field. The gateway routes to the correct provider automatically.
curl -X POST "/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{"model":"claude-sonnet-4-6","messages":[{"role":"user","content":"Hello"}]}'
Model prefix shorthand: pass the model name as a URL path segment before /v1/messages (e.g. /claude-sonnet/v1/messages).
curl "/v1/models"
Usage Examples
Gemini
curl -X POST "/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{"model":"gemini-thinking","messages":[{"role":"user","content":"What is 2+2?"}]}'
DeepSeek
curl -X POST "/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{"model":"deepseek-thinking","messages":[{"role":"user","content":"Explain quantum computing"}]}'
Qwen
curl -X POST "/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{"model":"qwen-thinking","messages":[{"role":"user","content":"Write a poem"}]}'
Kimi
curl -X POST "/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{"model":"kimi-thinking","messages":[{"role":"user","content":"Hello"}]}'
Claude
curl -X POST "/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{"model":"claude-opus-4-7","messages":[{"role":"user","content":"Explain relativity"}]}'
Meta AI
curl -X POST "/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{"model":"meta","messages":[{"role":"user","content":"Hello"}]}'
GPT (OpenAI)
curl -X POST "/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{"model":"gpt-4o","messages":[{"role":"user","content":"Hello"}]}'
Grok (xAI)
curl -X POST "/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{"model":"grok-4","messages":[{"role":"user","content":"Hello"}]}'
Anthropic-compatible
The gateway also supports Anthropic's /v1/messages format with model override via URL path prefix.
Anthropic-style message format. Maps model names like claude-sonnet-4-20250514, claude-opus-4-7 etc. automatically.
curl -X POST "/v1/messages" \ -H "Content-Type: application/json" \ --data '{"model":"claude-sonnet-4-20250514","messages":[{"role":"user","content":"Hello"}],"max_tokens":1024}'
Override the model by prefixing the URL path. Works with any V1 model ID.
curl -X POST "/claude-sonnet/v1/messages" \ -H "Content-Type: application/json" \ --data '{"messages":[{"role":"user","content":"Hello"}],"max_tokens":1024}'