v1.0.0-dev

Meta Ray-Ban x Poke

A developer bridge that pipes live camera frames from Meta Ray-Ban smart glasses into Poke's automation engine for real-time vision analysis. Capture what you see and get instant AI descriptions of your surroundings.

DAT SDKAndroid / iOSIngest TriggerVision LLM

How it works

Glasses ──capture──► Mobile App ──POST──► Poke Engine ──inferObject──► Vision LLM
  (DAT SDK)         (Android/iOS)     (ingest trigger)     (analysis)
                      │                                       │
                      ◄──────────── response ──────────────────┘
  1. 01Glasses capture a frame via the DAT SDK's captureFrame().
  2. 02Mobile app base64-encodes the JPEG and POSTs to Poke's ingest endpoint.
  3. 03Poke runs the meta_rayban_bridge.ts script, passing the image to a vision model.
  4. 04The LLM returns a scene description; Poke relays it back to the mobile app.

Getting started

01

Register at the Wearables Portal

Go to wearables.developer.meta.com and create an app. Select Device Access Toolkit (DAT) as the product.

02

Register your project and request permissions

In the DAT dashboard, register your Android package name or iOS Bundle ID and upload your signing certificate fingerprint. Then request these permissions:

PermissionWhy it is needed
wearable:streamingEnables live media streaming from the glasses
wearable:cameraCapturing photos / frames on demand

Approval can take 24-48 hours. You can develop with mock data while waiting.

03

Enable Developer Mode on the glasses

Open the Meta AI app on your phone. Go to Glasses tab > your device > Developer Mode and toggle it ON. The glasses reboot and are ready for DAT connections.

04

Configure the Poke ingest endpoint

In your Poke project dashboard, create an Ingest trigger and set the entry point to the ingestHandler function from meta_rayban_bridge.ts. Generate an API key from Settings and note your ingest URL.


Mobile SDK integration

Example implementations for both platforms using the Meta Wearables DAT SDK. Full source files in mobile/.

Android (Kotlin)

val wearables = Wearables(context, WearablesConfig(
    appId = "YOUR_APP_ID",
    appSecret = "YOUR_APP_SECRET"
))

wearables.requestPermissions(
    listOf(CAMERA, STREAMING),
    onGranted = { /* permissions OK */ },
    onDenied = { /* handle denial */ }
)

wearables.connect(SessionConfig(autoReconnect = true)) { session ->
    val frame: ByteArray = session.captureFrame()

    // Downscale and compress
    val scaled = BitmapFactory.decodeByteArray(frame, 0, frame.size)
        .let { Bitmap.createScaledBitmap(it, 1080, ..., true) }
    val jpeg = ByteArrayOutputStream().apply {
        scaled.compress(JPEG, 80, this)
    }.toByteArray()

    // POST to Poke
    postToPoke(jpeg, prompt = "What am I looking at right now?")

iOS (Swift)

let wearables = Wearables(config: WearablesConfig(
    appId: "YOUR_APP_ID",
    appSecret: "YOUR_APP_SECRET"
))

try await wearables.requestPermissions([.camera, .streaming])

let session = try await wearables.connect(
    config: SessionConfig(autoReconnect: true)
)

let frame: Data = try await session.captureFrame()

let scaled = UIImage(data: frame)?
    .jpegData(compressionQuality: 0.8)

let response = try await postToPoke(
    imageData: scaled,
    prompt: "What am I looking at right now?"
)

CameraCaptureAndroid.kt·CameraCaptureIOS.swift


Poke automation script

Runs on every ingest trigger. Decodes the image and asks a vision LLM to describe the scene. Deploy to your Poke project at poke/meta_rayban_bridge.ts.

export const ingestHandler = createServerFn({ method: "POST" })
  .validator((d: unknown) => ingestSchema.parse(d))
  .handler(async ({ data }) => {
    const { image, prompt } = data
    const imageBuffer = Buffer.from(image, "base64")

    const result = await Agent.inferObject({
      model: "claude-3-5-sonnet-v2@2025-04-15",
      system: "Describe what they are looking at in 1-3 concise sentences.",
      prompt: prompt,
      attachments: [{ type: "image", data: imageBuffer, mediaType: "image/jpeg" }],
    })

    return { status: "ok", analysis: result.text, latency_ms: Date.now() - startTime }
  })

meta_rayban_bridge.ts·Trigger config guide


API & handshake protocol

The mobile app sends a POST to the Poke ingest endpoint. Full spec in docs/architecture.md.

Request payload

{
  "image": "<base64-encoded JPEG>",
  "prompt": "What am I looking at right now?",
  "device_id": "abc123-def456",
  "timestamp": "2026-07-13T10:30:00Z",
  "meta": { "app_version": "1.0.0", "sdk_version": "0.5.0" }
}
FieldTypeRequiredDescription
imagestringyesBase64-encoded JPEG (no data:image/...)
promptstringnoOverride prompt. Default: "What am I looking at right now?"
device_idstringyesUnique identifier for the glasses or phone
timestampstringyesISO 8601 timestamp of capture
metaobjectnoArbitrary metadata (app version, battery level, etc.)

Response

{
  "status": "ok",
  "analysis": "You are looking at a wooden desk with a laptop, a coffee mug, and a succulent plant.",
  "latency_ms": 1234
}

Error codes

CodeHTTP statusDescription
invalid_api_key401Missing, expired, or malformed API key
payload_too_large413Request body exceeds 10 MB
invalid_image422Base64 decode failed or image is corrupted
rate_limited429Too many requests in a short window
server_error500Poke engine error (check script logs)

Authentication

Authorization: Bearer pk_xxxxxxxxxxxxxxxx

Generate your API key in the Poke dashboard under Settings > API Keys. Store it in the platform keystore on mobile devices.


Repository