LinconwavesLinconwavesUnified docs
AI Workers

Llava 1p5 7b Hf (Vision)

Vision inference via the Linconwaves AI Workers API.

Llava 1p5 7b Hf (slug: llava-1p5-7b-hf) runs vision inference (classification/detection).

Endpoint

  • URL: POST /:modelSlug with modelSlug = llava-1p5-7b-hf
  • 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}/llava-1p5-7b-hf`, {
  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}/llava-1p5-7b-hf`, {
    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 “Llava 1p5 7b Hf”.