> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connect AI agents to APIpie AI

The APIpie AI connector lets your AI agent act in each user's APIpie AI account. Each user connects their own APIpie AI access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 28 tools.

**Authentication:** Bearer Token
**Categories:** AI, Search
**Tools:** 28: 17 read, 8 write, 3 destructive
**Users sign in with:** Access token
**Built by:** Scalekit connector
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=APIPIE)

## Setup

1. ### Install the SDK

   **Node.js**

   ```bash
   npm install @scalekit-sdk/node dotenv
   ```

   **Python**

   ```bash
   pip install scalekit-sdk-python python-dotenv
   ```

2. ### Set your credentials

   Add your Scalekit credentials to your `.env` file. Find values in **[app.scalekit.com](https://app.scalekit.com)** > **Developers** > **API Credentials**.

   ```sh title=".env"
   SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
   SCALEKIT_CLIENT_ID=<your-client-id>
   SCALEKIT_CLIENT_SECRET=<your-client-secret>
   ```

3. ### Create the APIpie AI connection

   In **AgentKit > Connections**, create an APIpie AI connection. The name you give it is the `connection_name` your code passes. See [Configure connections](/agentkit/connections/).

4. ### Authorize a user and make your first call

   **Node.js** (`quickstart.mts`)

   ```typescript
   import { ScalekitClient } from '@scalekit-sdk/node'
   import 'dotenv/config'
   import { createInterface } from 'node:readline/promises'

   const scalekit = new ScalekitClient(
     process.env.SCALEKIT_ENVIRONMENT_URL,
     process.env.SCALEKIT_CLIENT_ID,
     process.env.SCALEKIT_CLIENT_SECRET,
   )
   const actions = scalekit.actions

   const connector = 'apipie'
   const identifier = 'user_123'

   // Generate an authorization link for the user
   const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
   console.log('Authorize APIpie AI:', link)
   const rl = createInterface({ input: process.stdin, output: process.stdout })
   await rl.question('Press Enter after authorizing...')
   rl.close()

   // Make your first call
   const result = await actions.executeTool({
     connector,
     identifier,
     toolName: 'apipie_models_detailed_list',
     toolInput: {},
   })
   console.log(result)
   ```

   ```bash
   npx tsx quickstart.mts
   ```

   **Python** (`quickstart.py`)

   ```python
   import os
   from scalekit import ScalekitClient
   from dotenv import load_dotenv
   load_dotenv()

   scalekit_client = ScalekitClient(
       env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),
       client_id=os.getenv("SCALEKIT_CLIENT_ID"),
       client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),
   )
   actions = scalekit_client.actions

   connection_name = "apipie"
   identifier = "user_123"

   # Generate an authorization link for the user
   link_response = actions.get_authorization_link(
       connection_name=connection_name,
       identifier=identifier,
   )
   print("Authorize APIpie AI:", link_response.link)
   input("Press Enter after authorizing...")

   # Make your first call
   result = actions.execute_tool(
       tool_input={},
       tool_name="apipie_models_detailed_list",
       connection_name=connection_name,
       identifier=identifier,
   )
   print(result)
   ```

   ```bash
   python quickstart.py
   ```

   Each user opens the link once and enters their APIpie AI credentials there. See [Authorize a user](/agentkit/tools/authorize/) for the full flow and statuses.

## Tools

Pass the exact name to `execute_tool`, with an input like each tool's example. To ask for a tool that's missing, use the [request form](https://scalekitsupport.portal.usepylon.com/forms/request-a-connector-tool).

**Node.js**

```typescript
const result = await actions.executeTool({
  toolName: 'apipie_jobs_search',
  toolInput: {
    query: '<query>',
  },
  connector: 'apipie',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="apipie_jobs_search",
    tool_input={
        "query": "<query>",
    },
    connection_name="apipie",
    identifier="user_123",
)
```

`result.data` is the app's response as JSON, and `result.execution_id` (`executionId` in Node.js) is the ID of the call.

### `apipie_jobs_search`

Search Jobs · Read-only

Search job postings (JSearch) by a free-form query with location, date, remote and type filters.
Returns job postings with title, employer, location, description, apply links and dates.
Include the job title and location in query for best results.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `query` (`string`, required): Search query, ideally job title plus location. Example: python developer in Berlin.
- `country` (`string`, optional): Country code. Defaults to us. Example: de.
- `date_posted` (`string`, optional): Posted within. Defaults to all. Example: week. One of: `all`, `today`, `3days`, `week`, `month`.
- `employment_types` (`string`, optional): Comma-separated types, for example FULLTIME,CONTRACTOR. Example: FULLTIME.
- `exclude_job_publishers` (`string`, optional): Comma-separated publishers to exclude. Example: Dice.
- `fields` (`string`, optional): Comma-separated job fields to return. Example: employer_name,job_title,job_apply_link.
- `job_requirements` (`string`, optional): Comma-separated requirements, for example under_3_years_experience,no_degree. Example: no_degree.
- `language` (`string`, optional): Language code for postings. Example: en.
- `num_pages` (`integer`, optional): Number of pages to return from page. Defaults to 1. Example: 1.
- `page` (`integer`, optional): Page to return (10 results each). Defaults to 1. Example: 1.
- `radius` (`integer`, optional): Distance from the location in km. Example: 25.
- `user` (`string`, optional): Your end-user identifier, for per-user usage and billing observability. Example: customer-123.
- `work_from_home` (`boolean`, optional): Only remote jobs. Example: true.

Example input: `{"query":"<query>"}`

### `apipie_models_detailed_list`

List Models Detailed · Read-only

List models with detailed information, optionally filtered by type, provider or name.
Returns models with full metadata, limits, pricing and capabilities.
Use apipie_models_list for a quick list.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `model` (`string`, optional): Model name. Example: claude-sonnet.
- `provider` (`string`, optional): Model provider. Example: anthropic.
- `type` (`string`, optional): Model type. Example: llm.

Example input: `{}`

### `apipie_models_list`

List Models · Read-only

List the models available through APIpie, optionally filtered by type, subtype or provider.
Returns models with id, provider, type, subtype, context length and pricing.
Use apipie_models_detailed_list for full details.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `combination` (`string`, optional): Provider and subtype combination. Example: openai-chat.
- `enabled` (`integer`, optional): 1 to show only enabled chat models. Example: 1. One of: `1`, `0`.
- `provider` (`string`, optional): Model provider. Example: openai.
- `subtype` (`string`, optional): Model subtype. Example: chat. One of: `chat`, `fill-mask`, `question-answering`, `tts`, `stt`, `multimodal`.
- `type` (`string`, optional): Model type. Example: llm. One of: `llm`, `vision`, `embedding`, `image`, `voice`, `moderation`, `coding`, `free`.

Example input: `{}`

### `apipie_property_details_get`

Get Property Details · Read-only

Get detailed information about one US property by its full address.
Returns property details such as price or estimate, beds, baths, area, lot, year built, tax and history.
Use apipie_real_estate_search to find properties first.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `address` (`string`, required): Full property address. Example: 1600 Pennsylvania Ave NW, Washington, DC 20500.
- `user` (`string`, optional): Your end-user identifier, for per-user usage and billing observability. Example: customer-123.

Example input: `{"address":"<address>"}`

### `apipie_queries_list`

List Query History · Read-only

List your API query history or its hourly, daily or weekly aggregates, newest first, with filters.
Returns query records with timestamp, user, app, provider, route (model), tokens and cost.
Use this for cost and usage analysis.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `app` (`string`, optional): Only this app. Example: supportbot.
- `days` (`integer`, optional): Days of history. Defaults to 30. Example: 7.
- `limit` (`integer`, optional): Records per page, up to 100. Defaults to 50. Example: 50.
- `offset` (`integer`, optional): Records to skip. Example: 0.
- `provider` (`string`, optional): Only this provider. Example: openai.
- `route` (`string`, optional): Only this route or model. Example: gpt4omini.
- `show` (`string`, optional): all records, or hourly, daily (default) or weekly aggregates. Example: daily. One of: `all`, `hourly`, `daily`, `weekly`.
- `user` (`string`, optional): Only this user (letters and numbers, up to 14 characters). Example: customer123.

Example input: `{}`

### `apipie_ragtune_collections_list`

List RAG Tune Collections · Read-only

List your RAG tune collections.
Returns the collection names.
Use apipie_vector_collections_list for raw vector collections.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `vector_provider` (`string`, optional): Vector store to use. Use the same provider for a collection every time. Example: qdrant. One of: `pinecone`, `qdrant`.

Example input: `{}`

### `apipie_real_estate_coordinates_search`

Search Real Estate By Coordinates · Read-only

Search US property listings within a circle around a latitude and longitude.
Returns listings with address, price, beds, baths, area and status.
Use apipie_real_estate_search to search by place name.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `diameter` (`number`, required): Diameter of the search area in miles. Example: 2.
- `lat` (`number`, required): Latitude of the center. Example: 30.2672.
- `long` (`number`, required): Longitude of the center. Example: -97.7431.
- `home_status` (`string`, optional): Listing status. Defaults to FOR_SALE. Example: FOR_SALE. One of: `FOR_SALE`, `FOR_RENT`, `RECENTLY_SOLD`.
- `home_type` (`string`, optional): Comma-separated property types, for example Houses,Townhomes,Condos. Example: Houses,Condos.
- `max_bathrooms` (`number`, optional): Maximum bathrooms. Example: 3.
- `max_bedrooms` (`number`, optional): Maximum bedrooms. Example: 4.
- `max_price` (`number`, optional): Maximum price. Example: 800000.
- `max_sqft` (`number`, optional): Maximum square footage. Example: 3000.
- `min_bathrooms` (`number`, optional): Minimum bathrooms. Example: 1.
- `min_bedrooms` (`number`, optional): Minimum bedrooms. Example: 2.
- `min_price` (`number`, optional): Minimum price. Example: 300000.
- `min_sqft` (`number`, optional): Minimum square footage. Example: 1000.
- `sort` (`string`, optional): Sort order. Defaults to DEFAULT. Example: NEWEST. One of: `DEFAULT`, `VERIFIED_SOURCE`, `PRICE_HIGH_LOW`, `PRICE_LOW_HIGH`, `NEWEST`, `BEDROOMS`.
- `user` (`string`, optional): Your end-user identifier, for per-user usage and billing observability. Example: customer-123.

Example input: `{"diameter":2,"lat":30.2672,"long":-97.7431}`

### `apipie_real_estate_polygon_search`

Search Real Estate By Polygon · Read-only

Search US property listings inside a polygon.
Returns listings with address, price, beds, baths, area and status.
Use apipie_real_estate_coordinates_search for a circular area.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `polygon` (`string`, required): Polygon as a string of longitude latitude pairs separated by commas, closing on the first point. Example: -97.75 30.26, -97.73 30.26, -97.73 30.28, -97.75 30.28, -97.75 30.26.
- `home_status` (`string`, optional): Listing status. Defaults to FOR_SALE. Example: FOR_SALE. One of: `FOR_SALE`, `FOR_RENT`, `RECENTLY_SOLD`.
- `home_type` (`string`, optional): Comma-separated property types, for example Houses,Townhomes,Condos. Example: Houses,Condos.
- `max_bathrooms` (`number`, optional): Maximum bathrooms. Example: 3.
- `max_bedrooms` (`number`, optional): Maximum bedrooms. Example: 4.
- `max_price` (`number`, optional): Maximum price. Example: 800000.
- `max_sqft` (`number`, optional): Maximum square footage. Example: 3000.
- `min_bathrooms` (`number`, optional): Minimum bathrooms. Example: 1.
- `min_bedrooms` (`number`, optional): Minimum bedrooms. Example: 2.
- `min_price` (`number`, optional): Minimum price. Example: 300000.
- `min_sqft` (`number`, optional): Minimum square footage. Example: 1000.
- `sort` (`string`, optional): Sort order. Defaults to DEFAULT. Example: NEWEST. One of: `DEFAULT`, `VERIFIED_SOURCE`, `PRICE_HIGH_LOW`, `PRICE_LOW_HIGH`, `NEWEST`, `BEDROOMS`.
- `user` (`string`, optional): Your end-user identifier, for per-user usage and billing observability. Example: customer-123.

Example input: `{"polygon":"<polygon>"}`

### `apipie_real_estate_search`

Search Real Estate By Location · Read-only

Search US property listings by county, neighborhood or ZIP code with price, size and room filters.
Returns listings with address, price, beds, baths, area, status and photos, up to 41 per page.
Use apipie_real_estate_coordinates_search or apipie_real_estate_polygon_search for map areas, and apipie_property_details_get for one address.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `location` (`string`, required): County, neighborhood or ZIP code. Example: Austin, TX.
- `home_status` (`string`, optional): Listing status. Defaults to FOR_SALE. Example: FOR_SALE. One of: `FOR_SALE`, `FOR_RENT`, `RECENTLY_SOLD`.
- `home_type` (`string`, optional): Comma-separated property types, for example Houses,Townhomes,Condos. Example: Houses,Condos.
- `max_bathrooms` (`number`, optional): Maximum bathrooms. Example: 3.
- `max_bedrooms` (`number`, optional): Maximum bedrooms. Example: 4.
- `max_price` (`number`, optional): Maximum price. Example: 800000.
- `max_sqft` (`number`, optional): Maximum square footage. Example: 3000.
- `min_bathrooms` (`number`, optional): Minimum bathrooms. Example: 1.
- `min_bedrooms` (`number`, optional): Minimum bedrooms. Example: 2.
- `min_price` (`number`, optional): Minimum price. Example: 300000.
- `min_sqft` (`number`, optional): Minimum square footage. Example: 1000.
- `page` (`integer`, optional): Page to return. Defaults to 1. Example: 1.
- `sort` (`string`, optional): Sort order. Defaults to DEFAULT. Example: NEWEST. One of: `DEFAULT`, `VERIFIED_SOURCE`, `PRICE_HIGH_LOW`, `PRICE_LOW_HIGH`, `NEWEST`, `BEDROOMS`.
- `user` (`string`, optional): Your end-user identifier, for per-user usage and billing observability. Example: customer-123.

Example input: `{"location":"<location>"}`

### `apipie_state_get`

Get State Settings · Read-only

Get the stored state settings (default model, memory, search and generation options) for the app or one end user.
Returns the state record with its settings.
Omit user for the app-level state. Use apipie_state_update to change it.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `app_name` (`string`, optional): App label for centralized state management. Example: supportbot.
- `user` (`string`, optional): End-user ID; omit for app-level state. Example: customer-123.

Example input: `{}`

### `apipie_vector_collections_list`

List Vector Collections · Read-only

List your vector collections.
Returns the collection names.
Use apipie_vectors_list for the vectors in one collection.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `apipie_vectors_fetch`

Fetch Vectors · Read-only

Get records from a vector collection by ID.
Returns the records with their values and metadata.
Use apipie_vectors_list to find IDs.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `collection_name` (`string`, required): Vector collection name. Example: support-docs.
- `ids` (`string`, required): Vector ID to fetch. Example: doc-42-chunk-3.

Example input: `{"collection_name":"<collection_name>","ids":"<ids>"}`

### `apipie_vectors_list`

List Vectors · Read-only

List vector IDs in a collection, optionally by ID prefix, with pagination.
Returns vector IDs and a pagination token.
Use apipie_vectors_fetch to read records by ID.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `collection_name` (`string`, required): Vector collection name. Example: support-docs.
- `limit` (`integer`, optional): Maximum IDs to return. Example: 100.
- `pagination_token` (`string`, optional): Token from the previous page. Example: eyJza2lwIjoxMDB9.
- `prefix` (`string`, optional): Only IDs starting with this prefix. Example: doc-42.

Example input: `{"collection_name":"<collection_name>"}`

### `apipie_vectors_query`

Query Vectors · Read-only

Find the vectors in a collection nearest to a query vector, optionally filtered by metadata or tag.
Returns matches with ID, score and, when requested, values and metadata.
Embed the query text with apipie_embeddings_create first.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `collection_name` (`string`, required): Vector collection name. Example: support-docs.
- `vector` (`array`, required): Query embedding. Example: [0.12, -0.03, 0.44]
- `filter` (`object`, optional): Metadata filter. Example: {"metatag": "faq"}
- `include_metadata` (`boolean`, optional): Include metadata. Example: true.
- `include_values` (`boolean`, optional): Include vector values. Example: false.
- `metatag` (`string`, optional): Only vectors with this tag. Example: faq.
- `top_k` (`integer`, optional): Number of matches to return. Example: 5.

Example input: `{"collection_name":"<collection_name>","vector":[0.12,-0.03,0.44]}`

### `apipie_web_scrape`

Scrape Web Page · Read-only

Fetch a web page's content through Bright Data or Valyu.
Returns the page content, parsed (default) or raw.
Use apipie_web_search to find pages first.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `url` (`string`, required): URL of the page. Example: https://example.com/pricing.
- `format` (`string`, optional): parsed (default) or raw. Example: parsed. One of: `raw`, `parsed`.
- `provider` (`string`, optional): brightdata (default) or valyu. Example: brightdata. One of: `brightdata`, `valyu`.
- `scrape_length` (`string`, optional): Valyu only: short, medium, large, max, or a character count from 1000 to 1000000. Example: medium.
- `scrape_render` (`boolean`, optional): Render JavaScript fully before scraping. Example: true.

Example input: `{"url":"<url>"}`

### `apipie_web_search`

Web Search · Read-only

Search the web with Valyu (search plus content extraction) or Google.
Returns results with title, URL and, for Valyu, extracted content and relevance.
Use apipie_web_search_answer for a written answer and apipie_web_scrape to read one page.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `query` (`string`, required): Search query. Example: latest EU AI Act guidance.
- `blacklist` (`array`, optional): Valyu only: domains, URLs or datasets to exclude. Example: ["example.com"]
- `end_date` (`string`, optional): Valyu only: latest date, YYYY-MM-DD. Example: 2026-11-01.
- `fast_mode` (`boolean`, optional): Valyu only: lower latency, shorter results. Example: false.
- `geo` (`string`, optional): Country code. Defaults to us. Example: us.
- `instructions` (`string`, optional): Instructions for query rewriting and reranking, up to 500 characters. Example: Prefer official sources.
- `lang` (`string`, optional): Language code. Defaults to en. Example: en.
- `max_price` (`number`, optional): Valyu only: maximum price in dollars per thousand retrievals. Example: 5.
- `relevance_threshold` (`number`, optional): Minimum relevance, 0 to 1, after reranking. Defaults to 0.5. Example: 0.5.
- `results` (`integer`, optional): Number of results: 1-100 for google, 1-20 for valyu. Defaults to 20. Example: 10.
- `safe_search` (`integer`, optional): Google only: 1 on, -1 moderate (default), -2 off. Example: -1. One of: `1`, `-1`, `-2`.
- `search_provider` (`string`, optional): valyu (default) or google. Example: valyu. One of: `google`, `valyu`.
- `start_date` (`string`, optional): Valyu only: earliest date, YYYY-MM-DD. Example: 2026-01-01.
- `url_only` (`boolean`, optional): Return only URLs, without content extraction. Example: false.
- `user` (`string`, optional): Your end-user identifier, for per-user usage and billing observability. Example: customer-123.
- `whitelist` (`array`, optional): Valyu only: domains, URLs or datasets to include. Example: ["europa.eu"]

Example input: `{"query":"<query>"}`

### `apipie_web_search_answer`

Search Answer · Read-only

Search with Valyu and write an AI answer to a question grounded in the results.
Returns the answer text with its sources.
Use apipie_web_search for raw results.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `query` (`string`, required): Question to answer. Example: What changed in the EU AI Act in 2026?.
- `search_provider` (`string`, required): Must be valyu. Example: valyu. One of: `valyu`.
- `blacklist` (`array`, optional): Domains, URLs or datasets to exclude. Example: ["example.com"]
- `fast_mode` (`boolean`, optional): Lower latency. Example: false.
- `geo` (`string`, optional): Country code. Defaults to us. Example: us.
- `results` (`integer`, optional): Number of search results to use, 1-10. Defaults to 5. Example: 5.
- `search` (`string`, optional): Sources to search: web, proprietary, all (default) or news. Example: news. One of: `web`, `proprietary`, `all`, `news`.
- `system_instructions` (`string`, optional): Instructions for how the answer is written. Example: Answer in three bullet points.
- `user` (`string`, optional): Your end-user identifier, for per-user usage and billing observability. Example: customer-123.
- `whitelist` (`array`, optional): Domains, URLs or datasets to include. Example: ["europa.eu"]

Example input: `{"query":"<query>","search_provider":"valyu"}`

### `apipie_chat_completion_create`

Create Chat Completion · Write

Send a chat conversation to one or more language models through APIpie's router, with optional memory, RAG over a vector collection, internet search grounding and tool calling.
Returns an OpenAI-style completion: id, model, choices with the assistant message, and usage.
Use apipie_models_list to pick a model. Use apipie_web_search_answer for a search-grounded answer without managing messages.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `messages` (`array`, required): Conversation so far, oldest first. Each message has a role (system, user or assistant) and content. Example: [{"role": "user", "content": "Why is the sky blue?"}]
- `model` (`string`, required): Model to use, or up to 5 comma-separated models. See apipie_models_list. Example: gpt-4o-mini.
- `inline_cli` (`string`, optional): Enable inline CLI :commands in the prompt, true/false or a comma-separated feature list. Example: true.
- `integrity` (`integer`, optional): Answer integrity: 12 returns the best of two answers, 13 the best of three. Example: 12. One of: `12`, `13`.
- `max_tokens` (`integer`, optional): Maximum tokens to generate. Example: 1024.
- `mem_clear` (`integer`, optional): 1 to delete all stored memories for mem_session now. Example: 1. One of: `0`, `1`.
- `mem_session` (`string`, optional): Memory chain ID, to keep separate memories per user or app. Example: session-4471.
- `memory` (`boolean`, optional): Keep conversation context in APIpie's integrated memory. Example: true.
- `provider` (`string`, optional): Provider to route to. Omit to let APIpie pick the most responsive provider. Example: openai.
- `rag_tune` (`string`, optional): Name of a RAG tune or vector collection to augment the query with. Example: support-docs.
- `routing` (`string`, optional): How to route when no provider is set and several serve the model, for example perf or price. Example: perf.
- `search_blacklist` (`array`, optional): Root domains the search must not use. Example: ["example.com"]
- `search_provider` (`string`, optional): Enable internet search grounding with this provider. Defaults to valyu. Example: valyu. One of: `valyu`, `google`.
- `search_whitelist` (`array`, optional): Root domains the search may use. Example: ["reuters.com", "apnews.com"]
- `temperature` (`number`, optional): Sampling temperature. Lower is more deterministic. Example: 0.7.
- `tool_choice` (`string`, optional): none, auto, or the name of a tool to force. Example: auto.
- `tools` (`array`, optional): OpenAI-style function tool definitions the model may call. Example: [{"type": "function", "function": {"name": "get_weather", "parameters": {"type": "object", "properties": {"city": {"type": "string"}}}}}]
- `top_p` (`number`, optional): Nucleus sampling cutoff. Example: 0.9.
- `user` (`string`, optional): Your end-user identifier, for per-user usage and billing observability. Example: customer-123.
- `vector_provider` (`string`, optional): Vector store to use. Use the same provider for a collection every time. Example: qdrant. One of: `pinecone`, `qdrant`.

Example input: `{"messages":[{"role":"user","content":"Why is the sky blue?"}],"model":"<model>"}`

### `apipie_embeddings_create`

Create Embeddings · Write

Generate an embedding vector for a text with an embedding model.
Returns data with the embedding vector, the model and usage.
Use apipie_vector_upsert to store it and apipie_vectors_query to search with it. Pick a model from apipie_models_list with type embedding.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `input` (`string`, required): Text to embed. Example: How do I reset my password?.
- `model` (`string`, required): Embedding model. Example: text-embedding-3-small.
- `dimensions` (`integer`, optional): Embedding size, up to the model's limit. Example: 512.
- `encoding_format` (`string`, optional): Output encoding, OpenAI models only. Example: float. One of: `float`, `np`.

Example input: `{"input":"<input>","model":"<model>"}`

### `apipie_image_generate`

Generate Image · Write

Generate an image from a text prompt with an image model (for example DALL-E, Flux or Stable Diffusion).
Returns data with the image URL or base64 JSON, depending on response_format.
Pick a model from apipie_models_list with type image. Options such as seed, steps and aspect_ratio apply only to some models.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `prompt` (`string`, required): Description of the image to generate. Example: A watercolor lighthouse at sunset.
- `aspect_ratio` (`string`, optional): Aspect ratio, where supported. The spec lists 9:21 and 21:9. Example: 21:9. One of: `9:21`, `21:9`.
- `image` (`string`, optional): URL of an image for the model to edit (not DALL-E 3). Example: https://example.com/input.png.
- `model` (`string`, optional): Image model. Example: dall-e-3.
- `quality` (`string`, optional): Image quality, for example standard or hd. Example: standard.
- `response_format` (`string`, optional): url or b64_json. Example: url. One of: `url`, `b64_json`.
- `seed` (`integer`, optional): Seed for reproducible output, where supported. Example: 42.
- `size` (`string`, optional): Image size. Example: 1024x1024.
- `steps` (`integer`, optional): Inference steps, where supported. Defaults to 30. Example: 30.
- `style` (`string`, optional): vivid or natural, where supported. Example: vivid.

Example input: `{"prompt":"<prompt>"}`

### `apipie_ragtune_document_add`

Add RAG Tune Document · Write

Download a document (PDF, DOC, DOCX, TXT, CSV, XLS or XLSX) from a URL, extract its text and store embeddings in a RAG tune collection.
Returns the processing result.
Then pass the collection name as rag_tune in apipie_chat_completion_create.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `collection_name` (`string`, required): Vector collection name. Example: support-docs.
- `url` (`string`, required): Public URL of the document. Example: https://example.com/handbook.pdf.
- `metatag` (`string`, optional): Tag stored with the document. Example: handbook.
- `vector_provider` (`string`, optional): Vector store to use. Use the same provider for a collection every time. Example: qdrant. One of: `pinecone`, `qdrant`.

Example input: `{"collection_name":"<collection_name>","url":"<url>"}`

### `apipie_state_update`

Update State Settings · Write

Create or merge state settings for the app or one end user, or remove specific keys.
Returns the updated state record.
Settings merge into existing ones; list keys in delete to remove them. Use apipie_state_delete to remove the whole record.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `app_name` (`string`, optional): App label for centralized state management. Example: supportbot.
- `delete` (`array`, optional): Setting keys to remove. Example: ["temperature"]
- `enable_inline_cli` (`boolean`, optional): Allow inline CLI :commands in prompts. Example: true.
- `enable_user_states` (`boolean`, optional): true for per-user state (needs user), false for per-app state. Example: true.
- `gui_only` (`boolean`, optional): Lock state so it can only be edited in the APIpie dashboard. Example: false.
- `settings` (`object`, optional): Settings to merge, for example model, memory or search options. Example: {"model": "gpt-4o-mini", "memory": true}
- `user` (`string`, optional): End-user ID. Required when enable_user_states is true. Example: customer-123.

Example input: `{}`

### `apipie_text_anonymize`

Anonymize Text · Write

Detect personal data (PII) in text with Microsoft Presidio and replace each entity with a short hash.
Returns the anonymized text and a mapping of the original values to their hashes.
Use this before sending sensitive text to a model.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `text` (`string`, required): Text that may contain personal data. Example: Call John Smith at 555-0100 or john@example.com.

Example input: `{"text":"<text>"}`

### `apipie_vector_collection_create`

Create Vector Collection · Write

Create a vector collection with a name and dimension.
Returns the created collection.
The dimension must match the embedding model you use with apipie_embeddings_create.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `collection_name` (`string`, required): Vector collection name. Example: support-docs.
- `dimension` (`integer`, required): Vector dimension. Example: 1536.
- `vector_provider` (`string`, optional): Vector store to use. Use the same provider for a collection every time. Example: qdrant. One of: `pinecone`, `qdrant`.

Example input: `{"collection_name":"<collection_name>","dimension":1536}`

### `apipie_vector_upsert`

Upsert Vector · Write

Insert or update one vector in a collection with its source text and an optional tag.
Returns the upsert result.
Create the embedding with apipie_embeddings_create first.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `collection_name` (`string`, required): Vector collection name. Example: support-docs.
- `embedding` (`array`, required): Embedding values. Example: [0.12, -0.03, 0.44]
- `vector_id` (`string`, required): ID for the vector; an existing ID is overwritten. Example: doc-42-chunk-3.
- `data` (`string`, optional): Source text stored with the vector. Example: To reset your password, open Settings > Security.
- `metatag` (`string`, optional): Tag for filtering. Example: faq.

Example input: `{"collection_name":"<collection_name>","embedding":[0.12,-0.03,0.44],"vector_id":"<vector_id>"}`

### `apipie_ragtune_collection_delete`

Delete RAG Tune Collection · Destructive

Delete a RAG tune collection, or specific records in it.
Returns the deletion result.
Set delete_all true to remove the whole collection.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `collection_name` (`string`, required): Vector collection name. Example: support-docs.
- `delete_all` (`boolean`, optional): true to delete the entire collection. Example: true.
- `filter` (`object`, optional): Metadata filter selecting records to delete. Example: {"metatag": "handbook"}
- `ids` (`array`, optional): Record IDs to delete. Example: ["rec-1"]

Example input: `{"collection_name":"<collection_name>"}`

### `apipie_state_delete`

Delete State Settings · Destructive

Delete the state record of one end user, or all state records of the app when user is omitted.
Returns a confirmation.
Use apipie_state_update with delete to remove single keys instead.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `app_name` (`string`, optional): App label for centralized state management. Example: supportbot.
- `user` (`string`, optional): End-user ID; omit to delete all state for the app. Example: customer-123.

Example input: `{}`

### `apipie_vectors_delete`

Delete Vectors · Destructive

Delete a whole vector collection, or specific vectors by ID or metadata filter.
Returns the deletion result.
Set delete_all true to remove the collection; otherwise send ids or filter.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `collection_name` (`string`, required): Vector collection name. Example: support-docs.
- `delete_all` (`boolean`, optional): true to delete the entire collection. Example: false.
- `filter` (`object`, optional): Metadata filter selecting vectors to delete. Example: {"metatag": "faq"}
- `ids` (`array`, optional): Vector IDs to delete. Example: ["doc-42-chunk-3"]

Example input: `{"collection_name":"<collection_name>"}`

## Related

Other AI connectors ([all 216](/agentkit/connectors/?category=ai)):

- [Chorus](/agentkit/connectors/chorus/): Scalekit connector, Username and password, 9 tools
- [Gong](/agentkit/connectors/gong/): Scalekit connector, OAuth, 69 tools
- [Jiminny](/agentkit/connectors/jiminny/): Scalekit connector, Access token, 27 tools


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
