> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt. # API Definitions ## Docs - [What is an API definition?](https://fern.docs.buildwithfern.com/learn/api-definitions/overview/what-is-an-api-definition.md): Describes the contract between the API provider and API consumer - [Project structure](https://fern.docs.buildwithfern.com/learn/api-definitions/overview/project-structure.md): Describes the Fern folder structure - [What is an OpenAPI specification?](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/overview.md): OpenAPI is a standard for documenting REST APIs - [Overlays](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/overlays.md): Use the OpenAPI Overlay Specification to customize your OpenAPI definition without modifying the original spec. - [Overrides](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/overrides.md): Customize your API definition using a separate overrides file. - [Authentication](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/authentication.md): Model auth schemes such as bearer, basic, api key, and OAuth. - [Servers](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/servers.md): Configure server URLs and environments to help users connect to your API. - [Sync your OpenAPI specification](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/sync-your-open-api-specification.md): Pull your latest OpenAPI Specification into your Fern Folder automatically. - [HTTP JSON Endpoints](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/endpoints/http.md): Document HTTP JSON APIs with the `application/json` content type - [Webhooks](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/endpoints/webhooks.md): Learn how to define webhooks using OpenAPI 3.1 native support or Fern's extensions. Generate webhook docs and SDK verification utilities. - [Multipart file upload](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/endpoints/multipart.md): Document endpoints with the `multipart/form-data` content type - [Server-sent events and streaming APIs](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/endpoints/sse.md): Use the `x-fern-streaming` extension to model streaming endpoints - [Extensions overview](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/extensions/overview.md): Learn about OpenAPI extensions in Fern. Customize authentication, SDK methods, versioning, and more for better API specs. - [API version](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/extensions/api-version.md): Configure API version schemes using `info.version` and `x-fern-version` - [Use audiences to filter your API](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/extensions/audiences.md): Learn how to use x-fern-audiences to filter OpenAPI endpoints, schemas, and properties for different API consumers like public and beta users. - [Availability](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/extensions/availability.md): Mark API endpoint availability in OpenAPI with `x-fern-availability`. Set beta, deprecated, stable, etc. statuses for endpoints and sections. - [Base path](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/extensions/base-path.md): Configure base paths in OpenAPI with `x-fern-base-path`. Set up endpoint prefixes like /v1 for your API definitions with Fern. - [Default values](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/extensions/default-values.md): Use `x-fern-default` to set client-side default values for path, header, and query parameters in generated SDKs. - [Discriminator context](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/extensions/discriminator-context.md): Use `x-fern-discriminator-context` to distinguish protocol-level discriminators (such as SSE event types) from data-level discriminators embedded in the JSON payload. - [Enum descriptions, names, casing, and availability](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/extensions/enum-descriptions-and-names.md): Add descriptions, custom names, per-language casing overrides, and deprecation status to OpenAPI enum values with the `x-fern-enum` extension. - [Request + response examples](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/extensions/request-response-examples.md): Configure OpenAPI request and response examples with x-fern-examples. Associate path parameters, query parameters, and responses in your API definition. - [API Explorer control](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/extensions/api-explorer-control.md): Enable or disable the API Explorer using `x-fern-explorer` - [Global headers](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/extensions/global-headers.md): Configure headers used across all endpoints using `x-fern-global-headers` extension - [Global parameters](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/extensions/global-parameters.md): Declare parameters set once at the client level and injected into every relevant request using the `x-fern-global-parameters` extension - [Ignoring elements](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/extensions/ignoring-elements.md): Use x-fern-ignore to exclude endpoints, schemas, properties, or parameters from your OpenAPI spec. Control what Fern reads and processes. - [Customize SDK method names](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/extensions/method-names.md): Use `x-fern-sdk-method-name` and `x-fern-sdk-group-name` to finetune SDK naming. - [SDK variables](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/extensions/sdk-variables.md): Use `x-fern-sdk-variables` to set common path parameters across all requests - [Tag display names](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/extensions/tag-display-names.md): Customize how tag names appear in your API Reference using the `x-displayName` extension - [Customize parameter names](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/extensions/parameter-names.md): Use `x-fern-parameter-name` to customize query parameter, header and path parameter naming. - [Property names](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/extensions/property-names.md): Customize variable names for object properties using the `x-fern-property-name` extension - [Idempotency](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/extensions/idempotency.md): Configure idempotency for safe request retries using x-fern-idempotency-headers and x-fern-idempotent extensions - [Pagination](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/extensions/pagination.md): Configure auto-pagination for list endpoints using the x-fern-pagination extension - [Retry behavior](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/extensions/retry-behavior.md): Control API retry logic with x-fern-retries extension. Configure endpoint-level retry behavior and disable retries for payment processing and order creation. - [Schema names](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/extensions/schema-names.md): Override auto-generated names for inline schemas using the `x-fern-type-name` extension - [Server names and URL templating](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/extensions/server-names-and-url-templating.md): Learn how to use x-fern-server-name, x-fern-default-url, and URL template variables in your OpenAPI specification for better SDK generation. - [FastAPI Instrumentation](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/frameworks/fastapi.md): Learn about best practices for creating rich OpenAPI Specifications when instrumenting FastAPI applications. - [OpenAPI generators.yml reference](https://fern.docs.buildwithfern.com/learn/api-definitions/openapi/generators-yml-reference.md): Reference for configuring OpenAPI specifications in your generators.yml file - [What is an AsyncAPI specification?](https://fern.docs.buildwithfern.com/learn/api-definitions/asyncapi/overview.md): AsyncAPI is a standard for documenting event-driven APIs - [Authentication](https://fern.docs.buildwithfern.com/learn/api-definitions/asyncapi/authentication.md): Model auth schemes such as bearer, basic, and api key for your event-driven APIs. - [Servers](https://fern.docs.buildwithfern.com/learn/api-definitions/asyncapi/servers.md): Configure server URLs and protocols to help users connect to your event-driven API. - [Sync your AsyncAPI specification](https://fern.docs.buildwithfern.com/learn/api-definitions/asyncapi/sync-your-async-api-specification.md): Automatically sync your AsyncAPI spec changes to keep SDKs and docs up to date - [Publish/Subscribe Operations](https://fern.docs.buildwithfern.com/learn/api-definitions/asyncapi/channels/pubsub.md): Define AsyncAPI publish/subscribe operations for event-driven APIs. Step-by-step tutorial with message examples and bi-directional channels. - [Message Formats](https://fern.docs.buildwithfern.com/learn/api-definitions/asyncapi/channels/messages.md): Define message schemas, content types, and structure for event-driven communication - [Message Bindings](https://fern.docs.buildwithfern.com/learn/api-definitions/asyncapi/channels/bindings.md): Configure protocol-specific settings for WebSocket, MQTT, Kafka, and other protocols - [Extensions overview](https://fern.docs.buildwithfern.com/learn/api-definitions/asyncapi/extensions/overview.md): Learn about Fern's AsyncAPI extensions for generating higher-quality SDKs - [Use audiences to filter your API](https://fern.docs.buildwithfern.com/learn/api-definitions/asyncapi/extensions/audiences.md): Use `x-fern-audiences` to filter to relevant operations, channels and message schemas - [Availability](https://fern.docs.buildwithfern.com/learn/api-definitions/asyncapi/extensions/availability.md): Mark features as available in specific SDK versions using `x-fern-availability` extension - [Request + response examples](https://fern.docs.buildwithfern.com/learn/api-definitions/asyncapi/extensions/request-response-examples.md): Add message examples to AsyncAPI specs with `x-fern-examples`. Improve SDK documentation with real-world payload examples. - [Ignoring operations, channels, or schemas](https://fern.docs.buildwithfern.com/learn/api-definitions/asyncapi/extensions/ignoring-elements.md): Learn how to use x-fern-ignore to exclude specific operations, channels, or schemas from AsyncAPI SDK generation. - [Server names](https://fern.docs.buildwithfern.com/learn/api-definitions/asyncapi/extensions/server-names.md): Configure custom server names in AsyncAPI specifications with `x-fern-server-name` extension. Set up production and staging server labels. - [What is an OpenRPC specification?](https://fern.docs.buildwithfern.com/learn/api-definitions/openrpc/overview.md): Learn how to use OpenRPC specifications with Fern to document JSON-RPC APIs. Set up your fern folder and configure OpenRPC v1.3.2 or v1.2.6. - [Authentication](https://fern.docs.buildwithfern.com/learn/api-definitions/openrpc/authentication.md): Model auth schemes for JSON-RPC APIs including bearer, basic, and api key authentication - [Servers](https://fern.docs.buildwithfern.com/learn/api-definitions/openrpc/servers.md): Configure server URLs and transports for your JSON-RPC API - [Sync your OpenRPC specification](https://fern.docs.buildwithfern.com/learn/api-definitions/openrpc/sync-your-open-rpc-specification.md): Automate OpenRPC spec syncing to keep SDKs and documentation current. Set up GitHub Actions, webhooks, and CI/CD integrations with Fern. - [JSON-RPC Methods](https://fern.docs.buildwithfern.com/learn/api-definitions/openrpc/methods/rpc-methods.md): Document JSON-RPC methods with parameters, results, and error handling - [Extensions overview](https://fern.docs.buildwithfern.com/learn/api-definitions/openrpc/extensions/overview.md): OpenRPC extensions guide for Fern. Use x-fern-ignore, x-fern-examples, x-fern-availability, and more to improve SDK generation. - [Use audiences to filter your API](https://fern.docs.buildwithfern.com/learn/api-definitions/openrpc/extensions/audiences.md): Use `x-fern-audiences` to filter to relevant methods, parameters and schemas - [Availability](https://fern.docs.buildwithfern.com/learn/api-definitions/openrpc/extensions/availability.md): Mark features as available in specific SDK versions using `x-fern-availability` extension - [Request + response examples](https://fern.docs.buildwithfern.com/learn/api-definitions/openrpc/extensions/request-response-examples.md): Add multiple request and response examples to OpenRPC methods with x-fern-examples. Improve your SDK docs with real-world use cases. - [Ignoring methods or schemas](https://fern.docs.buildwithfern.com/learn/api-definitions/openrpc/extensions/ignoring-elements.md): Skip reading specific OpenRPC elements using `x-fern-ignore` extension - [SDK Method Names](https://fern.docs.buildwithfern.com/learn/api-definitions/openrpc/extensions/method-names.md): Control SDK method names in OpenRPC specifications. Use `x-fern-sdk-method-name` to define intuitive, language-specific method names for your JSON-RPC API. - [SDK group names](https://fern.docs.buildwithfern.com/learn/api-definitions/openrpc/extensions/sdk-group-names.md): Learn how to use x-fern-sdk-group-name in OpenRPC to organize related methods into logical groups for cleaner, more intuitive SDK code. - [Server names](https://fern.docs.buildwithfern.com/learn/api-definitions/openrpc/extensions/server-names.md): Specify custom names for servers using `x-fern-server-name` extension - [What is gRPC?](https://fern.docs.buildwithfern.com/learn/api-definitions/grpc/overview.md): gRPC is a high-performance RPC framework that uses Protocol Buffers - [Authentication](https://fern.docs.buildwithfern.com/learn/api-definitions/grpc/authentication.md): Configure authentication for gRPC services including TLS, JWT, and custom auth - [Servers](https://fern.docs.buildwithfern.com/learn/api-definitions/grpc/servers.md): Configure gRPC servers with TLS, load balancing, and deployment options - [Sync your gRPC specification](https://fern.docs.buildwithfern.com/learn/api-definitions/grpc/sync-your-g-rpc-specification.md): Automate gRPC specification syncing with Fern. Set up GitHub Actions, CI/CD pipelines, and scheduled updates for Protocol Buffer files. - [gRPC Services](https://fern.docs.buildwithfern.com/learn/api-definitions/grpc/services/grpc-services.md): Define gRPC services with RPCs, messages, and Protocol Buffer schemas - [Streaming](https://fern.docs.buildwithfern.com/learn/api-definitions/grpc/services/streaming.md): Learn how to implement server streaming, client streaming, and bidirectional streaming in gRPC for real-time communication and efficient data transfers. - [Error handling](https://fern.docs.buildwithfern.com/learn/api-definitions/grpc/services/errors.md): Implement robust error handling with gRPC status codes and custom error details - [gRPC generators.yml reference](https://fern.docs.buildwithfern.com/learn/api-definitions/grpc/generators-yml-reference.md): Complete gRPC generators.yml reference guide for Fern. Learn how to configure root, target, overrides, and local-generation settings.