Quikturnv1.0
SDKs

SDK Overview

Official TypeScript SDK and React components for the Quikturn Logo API

The Quikturn Logo API can be used directly via REST (an <img> tag is all you need), but for deeper integration we publish two official packages:

PackagePurposeInstall
@quikturn/logosURL builder, browser client, server client, web componentnpm i @quikturn/logos
@quikturn/logos-reactReact Provider, components, and hooksnpm i @quikturn/logos-react

The SDKs are optional. The REST API works with any language or HTTP client. Use the SDKs when you want typed errors, automatic retries, batch operations, or drop-in React components.

Installation

# Core SDK (universal + browser + server + web component)
npm install @quikturn/logos

# React components (optional)
npm install @quikturn/logos-react
pnpm add @quikturn/logos
pnpm add @quikturn/logos-react
yarn add @quikturn/logos
yarn add @quikturn/logos-react

Requirements: Node.js >= 18, TypeScript recommended.

Entry Points

@quikturn/logos ships four entry points so you import only what you need:

ImportPlatformDescription
@quikturn/logosAnyURL builder, types, constants — zero dependencies
@quikturn/logos/clientBrowserBlob URLs, retries, scrape polling, events
@quikturn/logos/serverNode.jsBuffer output, streaming, batch operations
@quikturn/logos/elementBrowser<quikturn-logo> custom element

Quick Start

import { logoUrl } from "@quikturn/logos";

// Zero-dependency URL builder — no network calls
const url = logoUrl("github.com", { size: 128, format: "webp" });
// → "https://logos.getquikturn.io/github.com?size=128&format=webp"
import { QuikturnLogos } from "@quikturn/logos/client";

const client = new QuikturnLogos({ token: "pk_live_xxx" });

const { url, blob, metadata } = await client.get("stripe.com", {
  size: 128,
  format: "webp",
});

// url is a blob: URL ready for <img> tags
document.querySelector("img").src = url;

// Clean up when done
client.destroy();
import { QuikturnLogos } from "@quikturn/logos/server";

const client = new QuikturnLogos({
  secretKey: process.env.QT_SECRET_KEY!,
});

// Single logo → Buffer
const { buffer, metadata } = await client.get("stripe.com");

// Batch fetch
for await (const result of client.getMany(["stripe.com", "github.com"])) {
  if (result.success) {
    console.log(result.domain, result.buffer.length);
  }
}
import { QuikturnProvider, QuikturnLogo } from "@quikturn/logos-react";

function App() {
  return (
    <QuikturnProvider token="pk_live_xxx">
      <QuikturnLogo domain="stripe.com" size={64} />
    </QuikturnProvider>
  );
}

Authentication

The SDK supports two key types:

Key TypePrefixUse InAuth MethodMax Size
Publishablepk_ or qt_Browser client, React, web component?token= query param800px
Secretsk_Server client onlyAuthorization: Bearer header1200px

Never expose secret keys

Secret keys (sk_*) must only be used server-side. They are sent via the Authorization header and allow higher resolution logos (up to 1200px) and batch operations.

Logo Request Options

All clients accept the same options when requesting logos:

interface LogoRequestOptions {
  token?: string;              // API key (overrides client default)
  size?: number;               // Pixel width (default: 128, max: 800/1200)
  greyscale?: boolean;         // Desaturate to B&W
  theme?: "light" | "dark";    // Background variant
  format?: "png" | "jpeg" | "webp" | "avif";
}

Domain Validation

The SDK validates domains before making requests:

  • Rejects protocols (https://example.com → use example.com)
  • Rejects paths, IP addresses, and localhost
  • Max domain length: 253 characters
  • Requires at least 2 labels (e.g., example.com)

Invalid domains throw a DomainValidationError immediately without making a network request.

Next Steps

On this page