Try it live
Send requests against every endpoint, with schemas and example payloads, in the interactive API reference.
flinq is OpenAI-compatible. The fastest path is to take a working OpenAI
integration, change the base_url and the model name, and run it. The whole
integration is under ten lines.
Create a key in the flinq console. It looks like
flq_... and goes in the Authorization: Bearer header. New accounts start
with EUR 5 of free credit. The examples below use the placeholder
flq_your_key_here against the production API at https://api.flinq.ai.
curl https://api.flinq.ai/v1/embeddings \ -H "Authorization: Bearer flq_your_key_here" \ -H "Content-Type: application/json" \ -d '{ "model": "flinq-embed-2.0", "input": "Beton C25/30 XC4" }'from openai import OpenAI
client = OpenAI(base_url="https://api.flinq.ai/v1", api_key="flq_your_key_here")r = client.embeddings.create( model="flinq-embed-2.0", input="Beton C25/30 XC4",)print(len(r.data[0].embedding)) # 2048import OpenAI from 'openai';
const client = new OpenAI({ baseURL: 'https://api.flinq.ai/v1', apiKey: 'flq_your_key_here',});
const r = await client.embeddings.create({ model: 'flinq-embed-2.0', input: 'Beton C25/30 XC4',});console.log(r.data[0].embedding.length); // 2048The model is Matryoshka-trained: a single forward pass produces a 2048-dim
vector whose leading slice stays meaningful when truncated. Ask for
dimensions of 1024, 512, 256 or 128 to trade a little accuracy for
smaller vectors, a smaller index and faster nearest-neighbor search. flinq
truncates and re-normalizes for you.
r = client.embeddings.create( model="flinq-embed-2.0", input="Beton C25/30 XC4", dimensions=256,)Embed your corpus as documents (the default) and your search queries with
input_type: "query". A task such as lv_matching selects the query
instruction the model was trained with; it is not billed.
q = client.embeddings.create( model="flinq-embed-2.0", input="Mauerwerk Kalksandstein, d = 17,5 cm", extra_body={"input_type": "query", "task": "lv_matching"},)Try it live
Send requests against every endpoint, with schemas and example payloads, in the interactive API reference.
flinq-embed-2.0, flinq-rerank-2.0 and
flinq-embed-1.5-beta, their dimensions, tasks and limits.