Interfaze

logo

Beta

pricing

docs

blog

sign in

Get Started

Introduction

Examples

Vision

Concepts

Resources

Projects

Integrations

API Reference

Run Tasks

copy markdown

Interfaze architecture allows you to programmatically run parts of the model or built-in tools without activating the full model making it significantly faster and cheaper.

Available tasks

task NameDescription
ocrOptical character recognition on images and documents
object_detectionDetect objects in images
gui_detectionDetect GUI elements in images
web_searchWeb search
scraperExtract structured data from web pages
speech_to_textSpeech to text transcription
translateTranslation

Limits

  • Only one task can be run at a time.
  • The structured output is fixed for the task and cannot be customized.

How to run a task

  • The system system prompt has to contain the task name in the format <task>task_name</task>
  • The structured output response format has to be a type of any ot empty schema.

Example of system prompt:

<task>web_search</task>

Example of running a task

OpenAI SDK

Vercel AI SDK

LangChain SDK

import { z } from "zod";
import { zodResponseFormat } from "openai/helpers/zod";

const response = await interfaze.chat.completions.create({
	model: "interfaze-beta",
	messages: [
		{
			role: "system",
			content: "<task>speech_to_text</task>",
		},
		{
			role: "user",
			content: [
				{ type: "text", text: "Transcribe the audio file https://r2public.jigsawstack.com/interfaze/examples/stt_long_audio_sample_3.mp3" },
			],
		},
	],
	response_format: zodResponseFormat(z.any(), "empty_schema"),
});

console.log(response.choices[0].message.content);

Output

  • The output will always be a structured output with name of the task and the raw result
  • The result schema is different depending on the task
  • The result is the raw result of the specific model layer or tool
  • Each task will have a consistent structure on evert run

The output is truncated for this example.

Common issues faced

  • Only one <task> tag is parsed from the system message (the first match). One task can only be run at a time.
  • If a non-empty schema is provided alongside a <task> tag, the schema takes priority — the run task execution is skipped and the full model is activated to generate a structured response following the schema.
  • The response is the raw task output, not a natural language summary — plan your downstream processing accordingly.

Previous

Precontext

Next

Structured Outputs