Skip to content
Client logo

Client

Officialv6.7.2

@kubb/plugin-client

kubb add plugin-client

How-to guides

5 guides
Call operations
Call a generated function with one grouped options object. It returns your client's promise, shaped by your RequestResult type.
Migrate to v6
Update your client module for @kubb/plugin-client 6, which calls your client with type arguments and streams through client.stream.
Stream Server-Sent Events and JSON Lines
Add client.stream and its types to your client module, so streamed operations compile and yield typed events or lines.
Validate requests and responses
Pass Zod schemas from @kubb/plugin-zod to your client and run them there. For Valibot, add pluginValibot() from @kubb/plugin-valibot and write 'valibot' wherever this guide writes 'zod'.
Write your client
Build the client module that every generated function imports through importPath. You own its transport, auth, and error handling.