Terminal
Terminal/Skill
Builds and debugs text generation on Together AI's chat completions API, covering streaming, multi turn chat, tool calling, JSON output, and reasoning models.
By Together AI
Works with
npx skills add togethercomputer/skills --skill together-chat-completionsUse Together AI's serverless chat/completions API for interactive inference workloads:
Treat this skill as the default entry point for Together AI text generation unless the task is clearly offline batch processing, vector retrieval, model training, or infrastructure management.
together-batch-inference for large offline runs, backfills, or lower-cost asynchronous jobstogether-embeddings for vector search, semantic retrieval, or rerankingtogether-fine-tuning when the user wants to train or adapt a modeltogether-dedicated-model-inference when the user needs always-on single-tenant hostingtogether-dedicated-containers or together-gpu-clusters for custom infrastructuretogether>=2.0.0). If the user is on an older version, they must upgrade first: uv pip install --upgrade "together>=2.0.0".client.chat.completions.create() for Python and client.chat.completions.create() for TypeScript.messages history for multi-turn conversations; do not rebuild context from final text only.enum over free-form strings, set "additionalProperties": false, and add "strict": true on the function definition when you need argument generation to conform to the schema.finish_reason ("tool_calls" vs "stop") instead of assuming a tool was called, and parse function.arguments as JSON inside a try/except.json_schema over looser JSON modes when the user needs stable machine-readable output.reasoning key on both output and input (the field is symmetric). When you pass a prior assistant turn back to the API, include "reasoning": ... on the assistant message; reasoning_content is still accepted on input for backward compatibility but prefer reasoning in new code.usage.completion_tokens_details.reasoning_tokens, usage.prompt_tokens_details.cached_tokens), but some non-reasoning models return cached_tokens flat at the top of usage. Read both locations defensively — clients that only check one shape will silently return 0. See references/reasoning-models.md for the defensive-read pattern.tools (no response_format), Phase 2 sends response_format (no tools) after tool results are appended.response_format; accumulate chunks and parse the final concatenated string as JSON.async_parallel.py or hand off to batch inference.