Quickstart

From nothing to a dish a diner can place on their table. Three steps, about five minutes.

Get a publishable key

From the dashboard under Settings → Embedding, or from the partner API. Keys start with pk_.

POST /v1/partner/publishable-keys
curl https://api.armenus.app/v1/partner/publishable-keys \
  -H "Authorization: Bearer ak_your_secret_key" \
  -H "Content-Type: application/json" \
  -d '{"label":"iOS app","allowedOrigins":[]}'

The response contains the full key. It is safe to commit — see Publishable keys.

Create a client

Mount the provider once, near the root of your app.

App.tsx
import { ArmenusProvider } from "@armenus/sdk-react";
import "@armenus/sdk-react/styles.css";

export function App() {
  return (
    <ArmenusProvider publishableKey="pk_live_...">
      <Menu />
    </ArmenusProvider>
  );
}

Render a dish

Fetch by our id, or by your own SKU with useArmenusItemByRef so you never have to store our ids in your catalogue.

Dish.tsx
import { ArmenusModel, useArmenusItem } from "@armenus/sdk-react";

export function Dish({ itemId }) {
  const { data, error } = useArmenusItem(itemId);

  if (error) return <p>{error.message}</p>;

  // `data` may be null while loading — ArmenusModel handles that
  // and shows the poster image until the mesh arrives.
  return <ArmenusModel item={data} arLabel="See it on your table" />;
}

That is the whole integration. The SDK probes what the device can do, picks the right file format for the platform, prefetches the mesh, and hands AR to the system viewer.