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.

Introduction

The OpenAI SDK can be used to interact with the Linkup API, to generate responses.
We are only compatible with Responses API.
Chat Completions API is NOT supported at the moment.

Quickstart

Get started with the OpenAI SDK in less than 5 minutes!
1

Get your API Keys

Get your API key

Create a Linkup account for free to get your API key.
2

Installation

You can install the OpenAI SDK using the following:
pip install openai
3

Usage

Here is a basic usage showing how to use the OpenAI SDK:
from openai import OpenAI

client = OpenAI(
  base_url='https://api.linkup.so/v1',
  api_key="<YOUR API KEY>"
)

response = client.responses.create(
  model="linkup-standard",
  input="Can you tell me which women were awarded the Physics Nobel Prize",
)

print(response.output_text)

Input parameters

ParameterTypeDescriptionDefault
modelstringType of search to perform: "linkup-fast", "linkup-standard" or "linkup-deep"Required
For other parameters, please refer to the Responses API.

Model

The model field is used to select the type of search you want to perform:
  • "linkup-fast" (beta): the fastest mode. A single-pass, keyword-like search with no LLM involvement for query interpretation, reformulation, or evaluation. Optimized for conversational use cases where low latency is key (e.g. “weather in Paris today”)
  • "linkup-standard": the search will leverage agentic search for a fast yet accurate result, suited for queries that do not rely on sequential steps being performed or several pages being scraped (e.g. “What’s the weather in Paris today?”)
  • "linkup-deep": the search will use a full agentic workflow with up to 10 iterations to solve more complex queries (e.g. “First, find Linkup website domain. Then scrape the homepage, product page, and about us page. Then search for recent news. Consolidate the output in a comprehensive company profile”). Runs longer than the other depths.

Using structured output (advanced)

1

Get your API Keys

Get your API key

Create a Linkup account for free to get your API key.
2

Installation

You need to install the OpenAI SDK and Pydantic using the following:
pip install openai pydantic
3

Usage

Here is a example of how to use the structured output with the OpenAI SDK:
from openai import OpenAI
from pydantic import BaseModel

class Winner(BaseModel):
  name: str
  year: str

class Response(BaseModel):
  winners: list[Winner]

client = OpenAI(
  base_url='https://api.linkup.so/v1',
  api_key="<YOUR API KEY>"
)

response = client.responses.parse(
  model="linkup-standard",
  input="Can you tell me which women were awarded the Physics Nobel Prize",
  text_format=Response,
)

print(response.output_parsed)
Need help? Email support@linkup.so, ping us on Discord, or talk to us.