Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.linkup.so/llms.txt

Use this file to discover all available pages before exploring further.

FriendliAI provides fast AI inference. Linkup adds real-time web search to models served by FriendliAI, so your application can ground answers in current facts with cited sources.

FriendliAI’s Playground

Linkup’s web search can be turned on directly in FriendliAI’s API playground. Playground

FriendliAI’s API Integitgration

Linkup’s web search can be integrated as a default tool in calls made to the FriendliAI serverless APIs, simply by adding "tools": [{ "type": "linkup:search" }] in your OpenAI format API call. To that end, follow these steps:
1

Create your FriendliAI account

Create a new FriendliAI account if you don’t have one yet.
2

Subscribe to the free trial

You need to enroll in the Serverless Endpoints product free trial. Information can be found here.
3

Add your Linkup API key to your FriendliAI account

Get your API key

Create a Linkup account for free to get your API key.
In Friendli Suite, open Personal settings > Integrations and add your Linkup API key.
4

Make your first API call

In the following code snippet, FRIENDLI_TOKEN refers to your Personal Access Token, which you can obtain from Personal settings > Settings > Tokens (guide).
Make sure your Linkup integration is enabled in your Friendli account before calling the API, otherwise the linkup:search tool will error.
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.getenv("FRIENDLI_TOKEN"),
    base_url="https://api.friendli.ai/serverless/tools/v1",
)

completion = client.chat.completions.create(
    model="meta-llama-3.1-8b-instruct",
    messages=[
        {
            "role": "user",
            "content": "Find information on the popular movies currently showing in theaters and provide their ratings."
        }
    ],
    tools=[{"type": "linkup:search"}],
    stream=False
)

print(completion.choices[0].message.content)
Need help? Email support@linkup.so, ping us on Discord, or talk to us.