{"uid":"cap_HRTksy6h068zrFppqksdI","slug":"citiview-agent-market-kimi-k2-7-code-chat-completions-9409b5ab","name":"Citiview Agent Market – Kimi K2.7 Code Chat Completions","description":"OpenAI-compatible chat completions on Moonshot Kimi K2.7 Code, a coding and software-agent model with tool calling (262K context). Set your OpenAI SDK base URL to https://agents.citiviewgroup.com/v1/kimi-code and pay per token with x402 instead of an API key: $1.9 per million input and $8 per million output tokens, minimum $0.002 a call, at most $0.1742. The 402 quotes your request's maximum; \"upto\" payers are charged only the tokens used. Same request/response shape as OpenA","url":"https://agents.citiviewgroup.com/v1/kimi-code/chat/completions?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","description":"User message"},"system":{"type":"string","description":"Optional system message"},"max_tokens":{"type":"integer"},"temperature":{"type":"number"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"id":"chatcmpl-...","model":"kimi-k2.7-code","usage":{"total_tokens":18,"prompt_tokens":14,"completion_tokens":4},"object":"chat.completion","choices":[{"index":0,"message":{"role":"assistant","content":"Bonjour !"},"finish_reason":"stop"}]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.018422","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.018422/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.018422","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.018422","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_rmbszMi0QMVeMq1-O1FLZ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.018422","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"OpenAI-compatible chat completions powered by Moonshot Kimi K2.7 Code, a 262K-context coding and software-agent model with tool-calling, billed per token via x402","exampleAgentPrompt":"Using the Kimi K2.7 Code model, write me a Python function that takes a list of integers and returns all prime numbers in it — use up to 512 output tokens and a temperature of 0.2.","exampleUseCases":[{"title":"Automated code review agent","prompt":"I need you to review this JavaScript function for bugs and suggest improvements: `function sum(arr) { let total; for(let i=0;i<arr.length;i++) total += arr[i]; return total; }` — use Kimi K2.7 Code with up to 800 output tokens."},{"title":"On-demand coding assistant in agent pipeline","prompt":"Using the Kimi K2.7 Code model, help me write a SQL query that finds the top 5 customers by total order value from a table called orders with columns customer_id, amount, and created_at — keep the response under 400 tokens."},{"title":"Software agent tool-calling task","prompt":"Act as a coding assistant: given the system prompt 'You are a senior backend engineer' and the user message 'Explain how async/await works in Python with a practical example', generate a clear explanation using Kimi K2.7 Code with temperature 0.3 and max 600 tokens."}],"resultDescription":"Returns an OpenAI-format chat.completion JSON object containing the assistant's message content, role, finish reason, model name ('kimi-k2.7-code'), and token usage breakdown (prompt_tokens, completion_tokens, total_tokens). Response shape is identical to OpenAI's chat completions API.","failureModes":["Insufficient x402 payment — 402 response if payment header is missing or too low","Prompt too long — exceeds 262K context window, request rejected","Rate limiting — too many concurrent requests","Invalid parameter values — non-numeric temperature or max_tokens cause validation errors","Service unavailability — upstream Moonshot API downtime"],"whenToPreferThis":"Choose this endpoint when you need an OpenAI-compatible coding or software-agent LLM with a very large 262K context window, tool-calling support, and pay-per-token billing via x402 micropayments instead of a monthly API key subscription. It is particularly well-suited for autonomous agent pipelines that process large codebases or long context inputs and want fine-grained cost control at $1.9/M input and $8/M output tokens.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-15T06:38:37.165Z","isFirstParty":false,"canonicalSlug":"citiview-agent-market-kimi-k2-7-code-chat-completions-9409b5ab"}