{"id":"fc42c40c-8e6a-40f4-9461-86ed4b862f04","shortId":"QTq8aU","kind":"skill","title":"ai-chat","tagline":"Access 50+ LLM models through a unified OpenAI-compatible API via AceDataCloud. Use when you need chat completions from GPT, Claude, Gemini, Kimi, Grok, or other models through a single endpoint. Supports streaming, function calling, and vision.","description":"# AI Chat — Unified LLM Gateway\n\nAccess 50+ language models through a single OpenAI-compatible endpoint via AceDataCloud.\n\n> **Setup:** See [authentication](../_shared/authentication.md) for token setup.\n\n## Quick Start\n\n```bash\ncurl -X POST https://api.acedata.cloud/v1/chat/completions \\\n  -H \"Authorization: Bearer $ACEDATACLOUD_API_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\": \"claude-sonnet-4-20250514\", \"messages\": [{\"role\": \"user\", \"content\": \"Hello!\"}]}'\n```\n\n## OpenAI SDK Drop-in\n\n```python\nfrom openai import OpenAI\n\nclient = OpenAI(\n    api_key=\"your-token-here\",\n    base_url=\"https://api.acedata.cloud/v1\"\n)\n\nresponse = client.chat.completions.create(\n    model=\"gpt-4.1\",\n    messages=[{\"role\": \"user\", \"content\": \"Explain quantum computing\"}]\n)\nprint(response.choices[0].message.content)\n```\n\n## Available Models\n\n### OpenAI GPT\n\n| Model | Type | Best For |\n|-------|------|----------|\n| `gpt-4.1` | Latest | General-purpose, high quality |\n| `gpt-4.1-mini` | Small | Fast, cost-effective |\n| `gpt-4.1-nano` | Tiny | Ultra-fast, lowest cost |\n| `gpt-4o` | Multimodal | Vision + text |\n| `gpt-4o-mini` | Small multimodal | Fast vision tasks |\n| `o1` | Reasoning | Complex reasoning tasks |\n| `o1-mini` | Small reasoning | Quick reasoning |\n| `o1-pro` | Pro reasoning | Advanced reasoning |\n| `gpt-5` | Latest gen | Next-gen intelligence |\n| `gpt-5.4` | Gen 5.4 | High-performance next-gen |\n| `gpt-5-mini` | Mini gen 5 | Fast next-gen |\n\n### Anthropic Claude\n\n| Model | Type | Best For |\n|-------|------|----------|\n| `claude-opus-4-6` | Latest Opus | Highest capability |\n| `claude-sonnet-4-6` | Latest Sonnet | Balanced quality/speed |\n| `claude-opus-4-5-20251101` | Opus 4.5 | Premium tasks |\n| `claude-sonnet-4-5-20250929` | Sonnet 4.5 | High-quality balance |\n| `claude-sonnet-4-20250514` | Sonnet 4 | Reliable general-purpose |\n| `claude-haiku-4-5-20251001` | Haiku 4.5 | Fast, efficient |\n| `claude-3-5-sonnet-20241022` | Legacy 3.5 | Proven track record |\n| `claude-3-opus-20240229` | Legacy Opus | Maximum quality (legacy) |\n\n### Google Gemini\n\n| Model | Best For |\n|-------|----------|\n| `gemini-1.5-pro` | Long context, complex tasks |\n| `gemini-1.5-flash` | Fast, efficient |\n\n### xAI Grok\n\n| Model | Best For |\n|-------|----------|\n| `grok-4` | Latest, highest capability |\n| `grok-3` | General-purpose |\n| `grok-3-fast` | Speed-optimized |\n| `grok-3-mini` | Compact, efficient |\n\n## Features\n\n### Streaming\n\n```json\nPOST /v1/chat/completions\n{\n  \"model\": \"claude-sonnet-4-20250514\",\n  \"messages\": [{\"role\": \"user\", \"content\": \"Write a story\"}],\n  \"stream\": true\n}\n```\n\n### Function Calling\n\n```json\nPOST /v1/chat/completions\n{\n  \"model\": \"gpt-4.1\",\n  \"messages\": [{\"role\": \"user\", \"content\": \"What's the weather in Tokyo?\"}],\n  \"tools\": [\n    {\n      \"type\": \"function\",\n      \"function\": {\n        \"name\": \"get_weather\",\n        \"parameters\": {\"type\": \"object\", \"properties\": {\"location\": {\"type\": \"string\"}}}\n      }\n    }\n  ]\n}\n```\n\n### Vision\n\n```json\nPOST /v1/chat/completions\n{\n  \"model\": \"gpt-4o\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": [\n        {\"type\": \"text\", \"text\": \"What's in this image?\"},\n        {\"type\": \"image_url\", \"image_url\": {\"url\": \"https://example.com/photo.jpg\"}}\n      ]\n    }\n  ]\n}\n```\n\n## Parameters\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| `model` | string | Model name (see tables above) |\n| `messages` | array | Array of `{role, content}` objects |\n| `temperature` | 0–2 | Randomness (default: 1) |\n| `top_p` | 0–1 | Nucleus sampling |\n| `max_tokens` | integer | Maximum output tokens |\n| `stream` | boolean | Enable SSE streaming |\n| `tools` | array | Function calling definitions |\n| `tool_choice` | string/object | Tool selection strategy |\n\n## Response\n\n```json\n{\n  \"id\": \"chatcmpl-xxx\",\n  \"object\": \"chat.completion\",\n  \"model\": \"claude-sonnet-4-20250514\",\n  \"choices\": [\n    {\n      \"index\": 0,\n      \"message\": {\"role\": \"assistant\", \"content\": \"Hello!\"},\n      \"finish_reason\": \"stop\"\n    }\n  ],\n  \"usage\": {\n    \"prompt_tokens\": 10,\n    \"completion_tokens\": 5,\n    \"total_tokens\": 15\n  }\n}\n```\n\n## Gotchas\n\n- **100% OpenAI-compatible** — use the standard OpenAI SDK with `base_url=\"https://api.acedata.cloud/v1\"`\n- Billing is token-based with per-model pricing (more expensive models cost more per token)\n- Vision is supported on multimodal models (`gpt-4o`, `gpt-4o-mini`, `grok-2-vision-*`)\n- Function calling works on most modern models (GPT-4+, Claude 3+)\n- Streaming returns `chat.completion.chunk` objects via SSE\n- `finish_reason` values: `\"stop\"` (complete), `\"length\"` (max tokens), `\"tool_calls\"` (function call), `\"content_filter\"` (filtered)\n\n## Stateful Conversations Endpoint\n\nFor stateful, session-based chat (no need to send the full history each time), use the `/aichat/conversations` endpoint:\n\n```bash\ncurl -X POST https://api.acedata.cloud/aichat/conversations \\\n  -H \"Authorization: Bearer $ACEDATACLOUD_API_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\": \"gpt-4.1\", \"question\": \"What is quantum computing?\", \"stateful\": true}'\n```\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| `model` | string | Model name (see Available Models above) |\n| `question` | string | The prompt or question to answer |\n| `id` | string | Conversation ID — pass the same ID to continue a session |\n| `preset` | string | Preset/system prompt for the conversation |\n| `stateful` | boolean | Enable stateful conversation (maintains history server-side) |\n| `references` | array | Additional context documents to include |","tags":["chat","skills","acedatacloud","acedata-cloud","agent-skills","agentskills","ai-image","ai-music","ai-tools","ai-video","claude-code","cursor"],"capabilities":["skill","source-acedatacloud","skill-ai-chat","topic-acedata-cloud","topic-agent-skills","topic-agentskills","topic-ai-image","topic-ai-music","topic-ai-tools","topic-ai-video","topic-claude-code","topic-cursor","topic-gemini-cli","topic-github-copilot","topic-mcp"],"categories":["Skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/AceDataCloud/Skills/ai-chat","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add AceDataCloud/Skills","source_repo":"https://github.com/AceDataCloud/Skills","install_from":"skills.sh"}},"qualityScore":"0.453","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 7 github stars · SKILL.md body (5,603 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:14:01.535Z","embedding":null,"createdAt":"2026-05-18T13:21:31.791Z","updatedAt":"2026-05-18T19:14:01.535Z","lastSeenAt":"2026-05-18T19:14:01.535Z","tsv":"'-1.5':325,332 '-2':577 '-20240229':313 '-20241022':304 '-20250514':93,283,372,508 '-20250929':272 '-20251001':295 '-20251101':262 '-3':301,311,347,352,358 '-4':342,587 '-4.1':126,147,155,163,389,654 '-5':206,224,261,271,294,302 '-5.4':214 '-6':243,252 '/_shared/authentication.md':63 '/aichat/conversations':631,639 '/photo.jpg':442 '/v1':121,545 '/v1/chat/completions':75,366,386,417 '0':136,462,469,511 '1':466,470 '10':523 '100':531 '15':529 '2':463 '3':589 '3.5':306 '4':92,242,251,260,270,282,285,293,371,507 '4.5':264,274,297 '4o':173,179,421,571,574 '5':228,526 '5.4':216 '50':5,48 'access':4,47 'acedatacloud':16,59,79,643 'addit':712 'advanc':203 'ai':2,42 'ai-chat':1 'answer':680 'anthrop':233 'api':14,80,111,644 'api.acedata.cloud':74,120,544,638 'api.acedata.cloud/aichat/conversations':637 'api.acedata.cloud/v1':119,543 'api.acedata.cloud/v1/chat/completions':73 'application/json':86,650 'array':455,456,485,711 'assist':514 'authent':62 'author':77,641 'avail':138,670 'balanc':255,278 'base':117,541,550,618 'bash':69,633 'bearer':78,642 'best':144,237,322,339 'bill':546 'boolean':480,701 'call':39,383,487,580,605,607 'capabl':247,345 'chat':3,21,43,619 'chat.completion':502 'chat.completion.chunk':592 'chatcmpl':499 'chatcmpl-xxx':498 'choic':490,509 'claud':25,90,234,240,249,258,268,280,291,300,310,369,505,588 'claude-haiku':290 'claude-opus':239,257 'claude-sonnet':89,248,267,279,368,504 'client':109 'client.chat.completions.create':123 'compact':360 'compat':13,56,534 'complet':22,524,600 'complex':188,329 'comput':133,659 'content':84,97,130,376,393,425,459,515,608,648 'content-typ':83,647 'context':328,713 'continu':690 'convers':612,683,699,704 'cost':160,170,559 'cost-effect':159 'curl':70,634 'd':87,651 'default':465 'definit':488 'descript':446,664 'document':714 'drop':102 'drop-in':101 'effect':161 'effici':299,335,361 'enabl':481,702 'endpoint':35,57,613,632 'example.com':441 'example.com/photo.jpg':440 'expens':557 'explain':131 'fast':158,168,183,229,298,334,353 'featur':362 'filter':609,610 'finish':517,596 'flash':333 'full':625 'function':38,382,402,403,486,579,606 'gateway':46 'gemini':26,320,324,331 'gen':208,211,215,222,227,232 'general':150,288,349 'general-purpos':149,287,348 'get':405 'googl':319 'gotcha':530 'gpt':24,125,141,146,154,162,172,178,205,213,223,388,420,570,573,586,653 'gpt-4o':171,419,569 'gpt-4o-mini':177,572 'grok':28,337,341,346,351,357,576 'h':76,82,640,646 'haiku':292,296 'hello':98,516 'high':152,218,276 'high-perform':217 'high-qual':275 'highest':246,344 'histori':626,706 'id':497,681,684,688 'imag':433,435,437 'import':107 'includ':716 'index':510 'integ':475 'intellig':212 'json':364,384,415,496 'key':112 'kimi':27 'languag':49 'latest':148,207,244,253,343 'legaci':305,314,318 'length':601 'llm':6,45 'locat':411 'long':327 'lowest':169 'maintain':705 'max':473,602 'maximum':316,476 'messag':94,127,373,390,422,454,512 'message.content':137 'mini':156,180,193,225,226,359,575 'model':7,31,50,88,124,139,142,235,321,338,367,387,418,447,449,503,554,558,568,585,652,665,667,671 'modern':584 'multimod':174,182,567 'name':404,450,668 'nano':164 'need':20,621 'next':210,221,231 'next-gen':209,220,230 'nucleus':471 'o1':186,192,199 'o1-mini':191 'o1-pro':198 'object':409,460,501,593 'openai':12,55,99,106,108,110,140,533,538 'openai-compat':11,54,532 'optim':356 'opus':241,245,259,263,312,315 'output':477 'p':468 'paramet':407,443,444,662 'pass':685 'per':553,561 'per-model':552 'perform':219 'post':72,365,385,416,636 'premium':265 'preset':693 'preset/system':695 'price':555 'print':134 'pro':200,201,326 'prompt':521,676,696 'properti':410 'proven':307 'purpos':151,289,350 'python':104 'qualiti':153,277,317 'quality/speed':256 'quantum':132,658 'question':655,673,678 'quick':67,196 'random':464 'reason':187,189,195,197,202,204,518,597 'record':309 'refer':710 'reliabl':286 'respons':122,495 'response.choices':135 'return':591 'role':95,128,374,391,423,458,513 'sampl':472 'sdk':100,539 'see':61,451,669 'select':493 'send':623 'server':708 'server-sid':707 'session':617,692 'session-bas':616 'setup':60,66 'side':709 'singl':34,53 'skill' 'skill-ai-chat' 'small':157,181,194 'sonnet':91,250,254,269,273,281,284,303,370,506 'source-acedatacloud' 'speed':355 'speed-optim':354 'sse':482,595 'standard':537 'start':68 'state':611,615,660,700,703 'stop':519,599 'stori':379 'strategi':494 'stream':37,363,380,479,483,590 'string':413,448,666,674,682,694 'string/object':491 'support':36,565 'tabl':452 'task':185,190,266,330 'temperatur':461 'text':176,427,428 'time':628 'tini':165 'token':65,81,115,474,478,522,525,528,549,562,603,645 'token-bas':548 'tokyo':399 'tool':400,484,489,492,604 'top':467 'topic-acedata-cloud' 'topic-agent-skills' 'topic-agentskills' 'topic-ai-image' 'topic-ai-music' 'topic-ai-tools' 'topic-ai-video' 'topic-claude-code' 'topic-cursor' 'topic-gemini-cli' 'topic-github-copilot' 'topic-mcp' 'total':527 'track':308 'true':381,661 'type':85,143,236,401,408,412,426,434,445,649,663 'ultra':167 'ultra-fast':166 'unifi':10,44 'url':118,436,438,439,542 'usag':520 'use':17,535,629 'user':96,129,375,392,424 'valu':598 'via':15,58,594 'vision':41,175,184,414,563,578 'weather':397,406 'work':581 'write':377 'x':71,635 'xai':336 'xxx':500 'your-token-her':113","prices":[{"id":"6c4deeaf-84a8-4680-934e-399b289afa93","listingId":"fc42c40c-8e6a-40f4-9461-86ed4b862f04","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"AceDataCloud","category":"Skills","install_from":"skills.sh"},"createdAt":"2026-05-18T13:21:31.791Z"}],"sources":[{"listingId":"fc42c40c-8e6a-40f4-9461-86ed4b862f04","source":"github","sourceId":"AceDataCloud/Skills/ai-chat","sourceUrl":"https://github.com/AceDataCloud/Skills/tree/main/skills/ai-chat","isPrimary":false,"firstSeenAt":"2026-05-18T13:21:31.791Z","lastSeenAt":"2026-05-18T19:14:01.535Z"}],"details":{"listingId":"fc42c40c-8e6a-40f4-9461-86ed4b862f04","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"AceDataCloud","slug":"ai-chat","github":{"repo":"AceDataCloud/Skills","stars":7,"topics":["acedata-cloud","agent-skills","agentskills","ai-image","ai-music","ai-tools","ai-video","claude-code","cursor","gemini-cli","github-copilot","mcp","npm","openai-codex","roo-code"],"license":"other","html_url":"https://github.com/AceDataCloud/Skills","pushed_at":"2026-05-18T07:35:03Z","description":"Agent Skills for AceDataCloud AI services — music, image, video generation, web search, and more. Compatible with Claude Code, GitHub Copilot, Gemini CLI, and all agentskills.io-compatible agents.","skill_md_sha":"ecaeb42ad38f6a2804806683f7d89c61d7709ea3","skill_md_path":"skills/ai-chat/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/AceDataCloud/Skills/tree/main/skills/ai-chat"},"layout":"multi","source":"github","category":"Skills","frontmatter":{"name":"ai-chat","license":"Apache-2.0","description":"Access 50+ LLM models through a unified OpenAI-compatible API via AceDataCloud. Use when you need chat completions from GPT, Claude, Gemini, Kimi, Grok, or other models through a single endpoint. Supports streaming, function calling, and vision.","compatibility":"Requires ACEDATACLOUD_API_TOKEN in .env file (see _shared/authentication.md). Works as a drop-in replacement for the OpenAI SDK."},"skills_sh_url":"https://skills.sh/AceDataCloud/Skills/ai-chat"},"updatedAt":"2026-05-18T19:14:01.535Z"}}