{"uid":"cap_JFFWiUKY6v_pgXNcVcYcv","slug":"fastapi-online-docstring-generator-6b9db94b","name":"fastapi.online — Docstring Generator","description":"Chat, embeddings, OCR, speech-to-text, image editing, image understanding (captioning/Q&amp;A), text-to-speech, translation, writing tools, classification tools, developer tools, local utilities, format/checksum validators, encoding &amp; crypto utilities, date/time calculators, geo/coordinate math, math &amp; finance calculators, novelty tools, and business/social writing generators — 179 endpoints in all, across multiple specialized self-hosted models. Pay per call with crypto — no signup — or get an API key.","url":"https://api.fastapi.online/docstring-generate","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"code":{"type":"string","maxLength":20000,"minLength":1},"style":{"type":"string","maxLength":40}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_0pK3-2chsf7BNyd1R318H","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates docstrings for a given code snippet in a specified documentation style","exampleAgentPrompt":"Generate a Google-style docstring for this Python function: 'def add(a: int, b: int) -> int: return a + b'","exampleUseCases":[{"title":"Document a new Python utility function","prompt":"Can you write a numpy-style docstring for this function I just wrote? 'def calculate_mean(values: list) -> float: return sum(values) / len(values)'"},{"title":"Add docs before a code review","prompt":"I need to add Google-style docstrings to this class method before my PR review — here's the code: 'def fetch_user(self, user_id: str): return self.db.query(user_id)'"},{"title":"Auto-document a complex API handler","prompt":"Generate a reStructuredText docstring for this Flask route handler so I can include it in our project docs: 'def create_order(payload): validate(payload); return db.insert(payload)'"}],"resultDescription":"Returns a generated docstring string suitable for insertion into the provided code, covering parameters, return types, and a description of the function's behavior, formatted according to the requested documentation style (e.g. Google, NumPy, reStructuredText).","failureModes":["Empty or invalid code input returns a 422 validation error","Unsupported or misspelled style value may produce generic output or an error","Very long code snippets near the 20,000 character limit may result in truncated or low-quality docstrings","Payment not included or insufficient funds results in a 402 Payment Required response","Model inference errors may return a 500 internal server error"],"whenToPreferThis":"Choose this endpoint when you need a quick, pay-per-call docstring generation without signing up for a service. It is ideal for AI agents automating code documentation tasks, CI/CD pipelines that enforce documentation standards, or developers who want on-demand docstrings in a specific style (Google, NumPy, reST) without a subscription.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:47:37.507Z","isFirstParty":false}