LinconwavesLinconwavesUnified docs
AI Workers

Uform Gen2 Qwen 500m (Vision)

Vision inference via the Linconwaves AI Workers API.

Uform Gen2 Qwen 500m (slug: uform-gen2-qwen-500m) runs vision inference (classification/detection).

Endpoint

  • URL: POST /:modelSlug with modelSlug = uform-gen2-qwen-500m
  • Auth: Authorization: Bearer <api_key>
  • Content-Type: application/json
  • Base URL: https://aiworker.linconwaves.com

Request

{
  "image": [137, 80, 78, 71],
  "prompt": "Detect objects"
}

Send image bytes; prompt optional.

Error codes

  • 401 Unauthorized — Missing/invalid API key.
  • 400 Bad Request — Invalid payload (e.g., missing image).
  • 499 Client Closed Request — Request aborted by client.
  • 500 — Upstream model error or unexpected failure.

Backend snippets

const BASE = 'https://aiworker.linconwaves.com';
const API_KEY = process.env.AIWORKER_API_KEY!;

const payload = {
  "image": [137, 80, 78, 71],
  "prompt": "Detect objects"
};

const res = await fetch(`${BASE}/uform-gen2-qwen-500m`, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Authorization: `Bearer ${API_KEY}` ,
  },
  body: JSON.stringify(payload),
});
const data = await res.json();
console.log(data);

Frontend snippets

// app/api/aiworker/route.ts
const BASE = 'https://aiworker.linconwaves.com';
const API_KEY = process.env.AIWORKER_API_KEY!;

export async function POST(req: Request) {
  const payload = await req.json();
  const res = await fetch(`${BASE}/uform-gen2-qwen-500m`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      Authorization: `Bearer ${API_KEY}` ,
    },
    body: JSON.stringify(payload),
  });
  return new Response(await res.text(), { status: res.status, headers: res.headers });
}
  • Playground: Dashboard → Playground → select “Uform Gen2 Qwen 500m”.