{"uid":"cap_ydRvdA5zgpO4Q_Xx2XyDd","slug":"enclave402-small-model-text-completion-6a5e0400","name":"enclave402 Small-Model Text Completion","description":"Cheap small-model text completion for agent sub-tasks: classify, extract, summarize, rewrite. MUST be invoked when an agent needs a short LLM answer without paying flagship rates. Prompt <=8000 chars, maxTokens <=1024, json:true forces a JSON object. Do NOT use for long-form generation or tool calling. Settles $0.003 USDC; no charge on failure; receipts at /api/ledger.","url":"https://enclave402.com/api/compute/infer?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"json":{"type":"boolean","default":false,"description":"Force a JSON object response"},"prompt":{"type":"string","examples":["Classify the sentiment of: \"the settlement was fast and cheap\". Reply with one word."],"maxLength":8000,"description":"User prompt"},"system":{"type":"string","maxLength":2000,"description":"Optional system instruction"},"maxTokens":{"type":"integer","default":256,"maximum":1024,"minimum":1}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_R__lhBFm-yxvjWFlonvzg","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Runs cheap small-LLM inference for short agent sub-tasks: classify, extract, summarize, or rewrite text — with optional forced JSON output — at $0.003 USDC per call.","exampleAgentPrompt":"Using the cheap small-model inference endpoint, classify the sentiment of this review as positive, negative, or neutral and return it as JSON: \"The onboarding was straightforward but the dashboard feels cluttered.\" Keep the answer under 50 tokens.","exampleUseCases":[{"title":"Sentiment classification for reviews","prompt":"Classify the sentiment of this customer review as positive, negative, or neutral and return a JSON object with a 'label' field: \"Shipping was fast but the packaging was damaged when it arrived.\" Use the cheap inference endpoint and keep the response short."},{"title":"Structured data extraction from text","prompt":"Extract the company name, dollar amount, and date from this snippet and return them as a JSON object: \"Acme Corp closed a $4.2M seed round on March 15, 2024.\" Use the small-model inference — no need for a flagship LLM for this."},{"title":"One-sentence summarization for pipeline","prompt":"Summarize this product description in exactly one sentence, returning just the summary as plain text — keep it under 30 words: \"The UltraBlend 3000 is a high-performance countertop blender featuring a 2HP motor, 72oz BPA-free pitcher, self-cleaning mode, and 10-speed digital controls for professional-grade results at home.\""}],"resultDescription":"Returns a short text completion or, when json:true is set, a JSON object. The response reflects the model's answer to the prompt — a label, extracted fields, a rewritten string, or a summary — capped at maxTokens (up to 1024). No charge is applied on failure; successful calls settle $0.003 USDC and generate a receipt retrievable at /api/ledger.","failureModes":["Prompt exceeds 8000 characters — request rejected","maxTokens value exceeds 1024 — request rejected","json:true requested but model output is not parseable as JSON object — may return error or malformed output","Payment settlement failure — no charge applied, call does not complete","Model produces truncated output if maxTokens is set too low for the task","Empty or missing prompt field — likely returns error or empty completion"],"whenToPreferThis":"Choose this endpoint when you need a fast, cheap LLM inference call for simple sub-tasks (classify, extract, summarize, rewrite) and the prompt fits within 8000 characters with a short expected output (≤1024 tokens). Prefer it over flagship models when cost matters and long-form generation or tool-calling is not required. The forced JSON mode makes it especially useful for structured extraction pipelines inside agent workflows.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T12:32:07.646Z","isFirstParty":false,"canonicalSlug":"enclave402-small-model-text-completion-6a5e0400"}