Set up Respan
Set up Respan
- Sign up — Create an account at platform.respan.ai
- Create an API key — Generate one on the API keys page
- Add credits or a provider key — Add credits on the Credits page or connect your own provider key on the Integrations page
Use AI
Use AI
Add the Docs MCP to your AI coding tool to get help building with Respan. No API key needed.
1. Add Linkup Parameters to Your Request
Includelinkup_params in your request’s respan_params:
2. Use Template Variables in Your Messages
The Linkup response will be available as a variable namedlinkup_search_response in your templates. You can access it using Jinja2 syntax:
3. Using with Prompts
If you’re using Respan Prompts, you can include the Linkup template variables in your prompt templates. When you make a request withlinkup_params, the variables will be populated and rendered in your prompt.
How It Works
-
When a request with
linkup_paramsis received, the system:- Extracts the Linkup parameters from the request
- Calls the Linkup API to retrieve search results
- Adds the results to the template variables as
linkup_search_response - Renders the prompt templates with these variables
-
If you’re using stored prompts, the system:
- Loads the prompt without rendering variables
- Merges variables from the prompt and the request
- Processes Linkup parameters and adds results to variables
- Renders the prompt with all variables, including Linkup results
Parameters
Thelinkup_params object supports the following parameters:
| Parameter | Type | Description | Default |
|---|---|---|---|
q | string | The search query | Required |
depth | string | The depth of the search ("standard" or "deep") | "deep" |
outputType | string | The type of output ("searchResults", "sourcedAnswer" or "structured") | "sourcedAnswer" |
structuredOutputSchema | string | Schema for structured output | null |
includeImages | boolean | Whether to include images in the response | false |
Response Structure
Thelinkup_search_response variable will contain:
Example
Here’s a complete example of using the Linkup integration:Python
Error Handling
If there’s an error with the Linkup API call, it will be added to thewarnings_dict in the response with the key LINKUP_SEARCH_ERROR.