@vibechain/sdk is the official TypeScript client for the vibe.market API. Every documented operation is typed from the same OpenAPI schema this site publishes, so paths, parameters, request bodies and responses are checked by the compiler.
Install
First request
Register your own key first; see authentication and limits. The SDK sends it as theAPI-KEY header.
Discover the graph, then read
GET and POST take the literal paths from the API reference. The client picks the correct host for each operation: website discovery routes go to https://vibechain.com/api/vibemarket2, runtime and creator routes to https://build.vibechain.com/api/vibemarket2.
paths, operations and components types are exported for your own models:
BigInt or exact decimal arithmetic. Keep opaque next cursors intact and scoped to the same graph, resource and wallet.
Errors and request budgets
Successful calls return{ data, response }. Any non-2xx status throws VibechainApiError, whose body is unknown because a gateway can answer with JSON, HTML or plain text.
Retry-After and add bounded backoff where your application needs it. Pass an AbortSignal to bound each wait.
Redirects are not followed, so your key is never sent to an artwork or CDN host. A redirect raises VibechainApiError; validate its Location header yourself and fetch the public image without the key.
Uploads and creator actions
Binary form fields are typed asBlob. Use the exported toFormData serializer for the multipart operations and let fetch set the boundary.
POST /releases with the body described in the creator guide. Construct and sign the action exactly as that guide requires; the SDK serializes it without reordering fields.
Live updates
Request the stream route withparseAs: "stream" to receive raw server-sent-event bytes. Event parsing, resume IDs, reset handling and reconnect backoff belong to your application. Stream events are not transaction finality.
What the SDK does not do
- It contains no wallet, signer or contract client. It cannot buy packs, launch pools, approve allowances, open cards or transfer assets.
- It does not register API keys or make chain-RPC calls.
- It covers only the public vibe.market API in this reference. First-party account, chat and moderation APIs are not included.
Building for VibeMarket OS instead?
Apps and games that run inside VibeMarket OS use a different package,@vibechain/os. Its reference is at vibechain.com/os/docs.