Friendli Docs
Mintlify-powered documentation site for FriendliAI products (Model APIs, Dedicated Endpoints, Container).Language
- Conversations, explanations, and responses: Korean
- All code, comments, inline docs, scripts, and documentation files (
.md,.mdx, etc.): English - All GitHub PR titles and descriptions: English only
Quick Commands
SSOT (Single Source of Truth) update
OpenAPI schema update
Theopenapi.yaml is pulled from Speakeasy registry. Do not edit it by hand — use the Speakeasy workflow:
Project Structure
Writing Content
MDX page format
Every page is an.mdx file with YAML frontmatter. description and og:description must always be present and identical:
openapi frontmatter directive to bind to a spec operation:
File naming conventions
guides/— lowercase with hyphens (e.g.,model-apis/,tool-calling.mdx)openapi/— lowercase with hyphens (e.g.,chat-completions.mdx,image-generations.mdx)snippets/— kebab-case (e.g.,model-apis-token-based-table.mdx)
Registering a new page
A page must be added to thenavigation section in docs.json to appear in the sidebar. Pages are referenced without the .mdx extension. MDX files not listed in docs.json are still accessible via direct URL but hidden from navigation.
Moving or renaming a page
When changing a page’s URL path, add a redirect in theredirects section of docs.json so old links keep working:
"/old/:slug*" → "/new/:slug*"
Hiding a page
Rename the file extension from.mdx to .txt to prevent access entirely.
Mintlify built-in components
Prefer Mintlify built-in components over raw HTML or plain markdown when structuring content.Callouts
Use callouts to highlight important information. Choose the type based on intent:CodeGroup
Wrap multiple code blocks to show language/SDK alternatives in tabs. The filename becomes the tab label:Tabs
Use for non-code content that varies by OS, method, or mode:title across the page auto-sync when clicked.
Steps
Use for sequential procedures (tutorials, setup guides):Accordion
Use for FAQ pages or collapsible supplementary content:Card and CardGroup
Use for navigation links to related pages:Expandable and ResponseField
Use inopenapi/ pages for documenting nested API response structures:
Tooltip
Use for inline definitions of technical terms:Mermaid diagrams
Use for architecture diagrams, sequence flows, or decision trees instead of static images when possible:Code block enhancements
Mintlify code blocks support several useful features beyond basic syntax highlighting:Images
UseRoundedBorderBox to wrap images. Import it and use inline style to control sizing:
static/images/ in a subdirectory matching the guide path (e.g., static/images/guides/model-apis/).
Snippets
Reusable MDX fragments live insnippets/components/. Import and use them as JSX components:
snippets/components/card/— Card components for linking to pages (API reference, quickstart, etc.)snippets/components/callout-box/— Reusable info/warning calloutssnippets/components/frame/—RoundedBorderBoxfor imagessnippets/components/model-list/— Model tables (auto-generated)snippets/components/pricing-table/— Pricing tables (auto-generated)snippets/components/usage-table/— Usage tier tables (auto-generated)
Adding a new API endpoint
When adding a new endpoint to the API Reference:- Add the endpoint spec to
openapi.yaml(via Speakeasy) - Create a card snippet in
snippets/components/card/api-reference/<product>/for the new endpoint - Import and add the card to the corresponding
openapi/<product>/overview.mdx— this is how users discover the endpoint in the overview page - Register the endpoint page in the
navigationsection ofdocs.json
Writing Guidelines
All documentation must be written in English about FriendliAI products.- Capitalize plan names: “Basic plan”, “Enterprise plan”, “Trial plan”
- Use full plan names when referencing users: “Enterprise plan user” (not “enterprise user”)
- Format plan-specific features consistently: “(Enterprise plan only)”
- Maintain consistent terminology and branding throughout
.cursor/rules/writing-guideline.mdc
Code Style
- Prettier: 2-space tabs, double quotes, trailing commas. MDX files have
embeddedLanguageFormatting: off. Config:.prettierrc - ESLint: MDX linting with
eslint-plugin-mdx. Code blocks enforceno-varandprefer-const. Config:eslint.config.js - Pre-commit hook:
pnpm lintruns automatically on every commit (via husky). Fix lint errors before committing. - No debug artifacts: Do not commit
console.log, debugging statements, or sensitive environment variables (.env, API Keys, tokens). The.gitignoreexcludes.env*files, but always double-check before staging.
Auto-Generated Files — Do Not Hand-Edit
The following snippet files are generated by SSOT scripts (scripts/ssot/). Edit the corresponding source.ts instead, then run the SSOT update command above.
snippets/components/model-list/*.mdx— model availability and pricing tablessnippets/components/pricing-table/*.mdx— endpoint and fine-tuning pricingsnippets/components/usage-table/*.mdx— usage tier tables
openapi.yaml is managed by Speakeasy and should not be edited by hand.
SSOT data pipeline
SSOT source data lives in thefriendliai/web repository. The scripts in scripts/ssot/ fetch it via GitHub API, transform it, and write MDX snippets. A scheduled GitHub Action runs this automatically on weekdays (15:00 KST) and opens a PR titled Update SSOT (YYYY-MM-DD).
OpenAPI workflow
openapi.yaml is synced from Speakeasy registry (friendliai/friendliai/friendli-api-schema). To update, run speakeasy run or trigger the update-openapi-schema workflow manually. The generated spec should not be hand-edited — changes must go through the upstream API schema.
Changelog
Changelog entries inchangelog.mdx use the <Update> component:
- Group entries by month (
## Month, Year) label: short date (“Apr 9”)tags: array of product names (e.g.,["Model APIs"],["Dedicated Endpoints"])- Use
####for section headers within an entry (Model Release, Pricing Update, Deprecation, etc.)
Mintlify Reference
For Mintlify syntax and components, refer to the official documentation:- Components — Card, CardGroup, Tabs, Accordion, Info, Warning, etc.
- MDX syntax — text, code blocks, tables, images
- Page configuration — frontmatter options
- Navigation — docs.json navigation structure
- OpenAPI — API reference pages from OpenAPI specs