Squid API (0.0.16)

Download OpenAPI specification:

License: ISC

Agent

GetAgent

Returns the agent with the provided ID.

Authorizations:
apiKeyAuth
path Parameters
agentId
required
string

Responses

Request samples

squid
  .ai()
  .agent('resume-agent')
  .get()
  .then(agent => {
    console.log(agent);
  });

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "isPublic": true,
  • "auditLog": true,
  • "options": {
    }
}

UpsertAgent

Creates or updates the AI agent with the provided parameters.

Authorizations:
apiKeyAuth
Request Body schema: application/json
required
id
required
string (AiAgentId)

ID of AI agent. Also known as AI profile id.

description
string

An optional description of the agent's purpose or capabilities.

isPublic
boolean

Indicates whether the agent is publicly accessible; defaults to false.

auditLog
boolean

Enables audit logging for the agent's activities if true; defaults to false.

GeminiChatOptions (object) or OpenAiReasoningChatOptions (object) or OpenAiChatOptions (object) or AnthropicChatOptions (object) (ApiAiAgentChatOptions)

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "description": "string",
  • "isPublic": true,
  • "auditLog": true,
  • "options": {
    }
}

DeleteAgent

Deletes the AI agent with the provided ID.

Authorizations:
apiKeyAuth
Request Body schema: application/json
required
agentId
required
string (AiAgentId)

ID of AI agent. Also known as AI profile id.

Responses

Request samples

Content type
application/json
{
  • "agentId": "string"
}

UpsertContexts

Adds or updates multiple agent contexts (knowledge). If some of the contexts are of type 'file', a corresponding file should be uploaded.

Authorizations:
apiKeyAuth
Request Body schema: multipart/form-data
required
agentId
required
string

The ID of the agent to add the contexts to.

contexts
required
string

A JSON string representing an array of AgentContextRequest objects.

files
Array of strings <binary> [ items <binary > ]

The context files to upload.

Responses

Request samples

void squid
  .ai()
  .agent('resume-agent')
  .upsertContexts(
    [
      {
        contextId: 'ctx1',
        type: 'text',
        text: 'Some knowledge',
        title: 'Text knowledge',
      },
      { contextId: 'ctx2', type: 'file' },
    ],
    [new File(['file content'], 'file.txt')],
  );

DeleteContexts

Deletes multiple agent contexts (knowledge) from the agent by their IDs.

Authorizations:
apiKeyAuth
Request Body schema: application/json
required
agentId
required
string (AiAgentId)

ID of AI agent. Also known as AI profile id.

contextIds
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "agentId": "string",
  • "contextIds": [
    ]
}

GetContext

Returns a context (knowledge) of the agent by its ID.

Authorizations:
apiKeyAuth
path Parameters
agentId
required
string
contextId
required
string

Responses

Request samples

squid
  .ai()
  .agent('resume-agent')
  .getContext('ctx1')
  .then(context => {
    console.log(context);
  });

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "agentId": "string",
  • "type": "text",
  • "title": "string",
  • "text": "string",
  • "preview": true,
  • "sizeBytes": 0.1,
  • "metadata": { }
}

UpdateInstructions

Updates the agent's instruction prompt.

Authorizations:
apiKeyAuth
Request Body schema: application/json
required
agentId
required
string
instructions
required
string

Responses

Request samples

Content type
application/json
{
  • "agentId": "string",
  • "instructions": "string"
}

UpdateModel

Changes the AI model used by the agent.

Authorizations:
apiKeyAuth
Request Body schema: application/json
required
agentId
required
string
model
required
string (AiChatModelName)
Enum: "gemini-1.5-pro" "gemini-2.0-flash" "gpt-4o" "gpt-4o-mini" "o1" "o1-mini" "o3" "o3-mini" "o4-mini" "claude-3-5-haiku-latest" "claude-3-5-sonnet-latest" "claude-3-7-sonnet-latest"

Responses

Request samples

Content type
application/json
{
  • "agentId": "string",
  • "model": "gemini-1.5-pro"
}

UpdateConnectedAgents

Updates the list of agents connected to this agent.

Authorizations:
apiKeyAuth
Request Body schema: application/json
required
agentId
required
string
required
Array of objects (AiConnectedAgentMetadata)

Responses

Request samples

Content type
application/json
{
  • "agentId": "string",
  • "connectedAgents": [
    ]
}

ListContexts

Lists all contexts associated with the agent.

Authorizations:
apiKeyAuth
path Parameters
agentId
required
string

Responses

Request samples

squid
  .ai()
  .agent('resume-agent')
  .listContexts()
  .then(contexts => {
    console.log(contexts);
  });

Response samples

Content type
application/json
{
  • "contexts": [
    ]
}

ProvideFeedback

Sends user feedback to the agent.

Authorizations:
apiKeyAuth
Request Body schema: application/json
required
agentId
required
string
feedback
required
string

Responses

Request samples

Content type
application/json
{
  • "agentId": "string",
  • "feedback": "string"
}

ResetFeedback

Resets any feedback previously provided to the agent.

Authorizations:
apiKeyAuth
Request Body schema: application/json
required
agentId
required
string

Responses

Request samples

Content type
application/json
{
  • "agentId": "string"
}

UpdateGuardrails

Updates the agent's guardrails settings.

Authorizations:
apiKeyAuth
Request Body schema: application/json
required
agentId
required
string
required
object (GuardrailsOptions)

Options for applying guardrails to AI responses to enforce specific constraints.

Responses

Request samples

Content type
application/json
{
  • "agentId": "string",
  • "guardrails": {
    }
}

UpdateCustomGuardrails

Update custom guardrails for the agent.

Authorizations:
apiKeyAuth
Request Body schema: application/json
required
agentId
required
string
customGuardrail
required
string

Responses

Request samples

Content type
application/json
{
  • "agentId": "string",
  • "customGuardrail": "string"
}

DeleteCustomGuardrail

Deletes the custom guardrail for the agent.

Authorizations:
apiKeyAuth
Request Body schema: application/json
required
agentId
required
string

Responses

Request samples

Content type
application/json
{
  • "agentId": "string"
}

Ask

Sends a prompt and returns a full text answer.

Authorizations:
apiKeyAuth
Request Body schema: application/json
required
agentId
required
string
prompt
required
string
GeminiChatOptions (object) or OpenAiReasoningChatOptions (object) or OpenAiChatOptions (object) or AnthropicChatOptions (object) (ApiAiAgentChatOptions)

Responses

Request samples

Content type
application/json
{
  • "agentId": "string",
  • "prompt": "string",
  • "options": {
    }
}

Response samples

Content type
application/json
{
  • "responseString": "string"
}

Search

Performs a semantic search using the agent's knowledge base.

Authorizations:
apiKeyAuth
Request Body schema: application/json
required
agentId
required
string
required
object (AiSearchOptions)

The options for the AI agent search method.

Responses

Request samples

Content type
application/json
{
  • "agentId": "string",
  • "options": {
    }
}

Response samples

Content type
application/json
{
  • "chunks": [
    ]
}

Matchmaking

GetMatchMaker

Retrieves matchmaker details.

Authorizations:
apiKeyAuth
path Parameters
matchMakerId
required
string

The ID of the matchmaker to retrieve.

--squidCodeSampleFile ./src/code-samples/matchmaking/matchmaker-getMatchMaker.ts,Client SDK

Responses

Response samples

Content type
application/json
{
  • "matchMaker": {
    }
}

CreateMatchMaker

Creates a new matchmaker.

Authorizations:
apiKeyAuth
Request Body schema: application/json
required

The matchmaker object to create.

--squidCodeSampleFile ./src/code-samples/matchmaking/matchmaker-create.ts,Client SDK

id
required
string

The unique identifier of the matchmaker.

description
required
string

A description aiding the AI in understanding the matchmaker's domain.

required
Array of objects (MmCategory)

An array of categories defining the types of entities that can be matched.

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "description": "string",
  • "categories": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "description": "string",
  • "categories": [
    ]
}

ListMatchMakers

Lists all existing matchmakers.

Authorizations:
apiKeyAuth

Responses

Request samples

squid
  .ai()
  .matchMaking()
  .listMatchMakers()
  .then(matchmakers => {
    console.log(matchmakers);
  });

Response samples

Content type
application/json
{
  • "matchMakers": [
    ]
}

DeleteMatchMaker

Deletes an existing matchmaker by its ID.

Authorizations:
apiKeyAuth
Request Body schema: application/json
required

The request object containing the matchmaker ID to delete.

--squidCodeSampleFile ./src/code-samples/matchmaking/matchmaker-delete.ts,Client SDK

matchMakerId
required
string

Responses

Request samples

Content type
application/json
{
  • "matchMakerId": "string"
}

InsertEntities

Inserts a new entity into the specified matchmaker.

Authorizations:
apiKeyAuth
Request Body schema: application/json
required

The request object containing the matchmaker ID and entities to insert.

--squidCodeSampleFile ./src/code-samples/matchmaking/matchmaker-insertManyEntities.ts,Client SDK

matchMakerId
required
string
required
Array of objects (MmEntity)

Responses

Request samples

Content type
application/json
{
  • "matchMakerId": "string",
  • "entities": [
    ]
}

DeleteEntity

Deletes a specific entity from the matchmaker.

Authorizations:
apiKeyAuth
Request Body schema: application/json
required

The request object containing the matchmaker ID and entity ID to delete.

matchMakerId
required
string
entityId
required
string

Responses

Request samples

Content type
application/json
{
  • "matchMakerId": "string",
  • "entityId": "string"
}

FindMatches

Finds matches for an entity already inserted in the matchmaker.

Authorizations:
apiKeyAuth
Request Body schema: application/json
required

The request object containing the matchmaker ID, entity ID, and options for finding matches.

matchMakerId
required
string
entityId
required
string
required
object (MmFindMatchesOptions)

Represents options for finding matches in the matchmaker system.

Responses

Request samples

Content type
application/json
{
  • "matchMakerId": "string",
  • "entityId": "string",
  • "options": {
    }
}

Response samples

Content type
application/json
{
  • "matches": [
    ]
}

FindMatchesForEntity

Finds matches for an entity not yet inserted into the matchmaker.

Authorizations:
apiKeyAuth
Request Body schema: application/json
required

The request object containing the matchmaker ID, entity, and options for finding matches.

matchMakerId
required
string
required
object (Omit_MmEntity.metadata-or-id_)

From T, pick a set of properties whose keys are in the union K

required
object (MmFindMatchesOptions)

Represents options for finding matches in the matchmaker system.

Responses

Request samples

Content type
application/json
{
  • "matchMakerId": "string",
  • "entity": {
    },
  • "options": {
    }
}

Response samples

Content type
application/json
{
  • "matches": [
    ]
}

ListEntities

Lists entities in the specified category within the matchmaker.

Authorizations:
apiKeyAuth
Request Body schema: application/json
required

The request object containing the matchmaker ID, category ID, and options for listing entities.

matchMakerId
required
string
categoryId
required
string
required
object (MmListEntitiesOptions)

Represents options for listing entities in the matchmaker system.

    • @category AI

Responses

Request samples

Content type
application/json
{
  • "matchMakerId": "string",
  • "categoryId": "string",
  • "options": {
    }
}

Response samples

Content type
application/json
{
  • "entities": [
    ]
}

GetEntity

Retrieves a specific entity from the matchmaker.

Authorizations:
apiKeyAuth
path Parameters
matchMakerId
required
string

The ID of the matchmaker.

entityId
required
string

The ID of the entity to retrieve.

Responses

Request samples

squid
  .ai()
  .matchMaking()
  .getMatchMaker('resume-and-job-description')
  .then(matchmaker => {
    if (!matchmaker) return;
    return matchmaker.getEntity('resumeId1');
  });

Response samples

Content type
application/json
{
  • "entity": {
    }
}

AI Image

GenerateImage

Generates an image using AI and returns a url to the generated image. The url will be available for one hour.

Authorizations:
apiKeyAuth
Request Body schema: application/json
required

The request object containing the prompt and options for image generation.

prompt
required
string
required
DallEOptions (object) or StableDiffusionCoreOptions (object) or FluxOptions (object) (AiGenerateImageOptions)

Responses

Request samples

Content type
application/json
{
  • "prompt": "string",
  • "options": {
    }
}

Response samples

Content type
application/json
"string"

RemoveBackground

Generates an image using AI and returns a url to the generated image. The url will be available for one hour.

Authorizations:
apiKeyAuth
Request Body schema: multipart/form-data
required
file
required
string <binary>

The image file to be processed.

Responses

Request samples

void squid
  .ai()
  .image()
  .removeBackground(new File(['<Actual file content>'], 'file.png'));

Response samples

Content type
application/json
"string"

AI Audio

TranscribeAudio

Transcribes the spoken content of an uploaded audio file into text.

Authorizations:
apiKeyAuth
Request Body schema: multipart/form-data
required
file
required
string <binary>

The audio file to transcribe.

optionsJson
required
string

A JSON string representing a AiAudioTranscribeOptions object.

Responses

Request samples

void squid.ai().audio().createSpeech('Create a speech of a men talking with his son', {
  modelName: 'tts-1',
});

Response samples

Content type
application/json
"string"

CreateSpeechAudio

Converts text into synthesized speech and returns an audio file URL. The URL will be available for one hour.

Authorizations:
apiKeyAuth
Request Body schema: application/json
required

The request object containing the input text and options for speech synthesis.

input
required
string
required
object (AiAudioCreateSpeechOptions)

Options for creating speech using OpenAI's text-to-speech models.

Responses

Request samples

Content type
application/json
{
  • "input": "string",
  • "options": {
    }
}

Web Utilities

AiSearch

Search the web using AI. Returns a response containing Markdown text and cited URLs.

Authorizations:
apiKeyAuth
Request Body schema: application/json
required

The request object containing the search query.

query
required
string

The search query.

Responses

Request samples

Content type
application/json
{
  • "query": "string"
}

Response samples

Content type
application/json
{
  • "markdownText": "string",
  • "citedUrls": [
    ]
}

GetUrlContent

Fetch content from a URL. Returns the content in Markdown format.

Authorizations:
apiKeyAuth
Request Body schema: application/json
required

The request object containing the URL to fetch content from.

url
required
string

The URL to fetch content from.

Responses

Request samples

Content type
application/json
{
  • "url": "string"
}

Response samples

Content type
application/json
{
  • "markdownText": "string"
}