Skip to main content
POST
/
api
/
v2
/
tenants
/
{tenant}
/
databases
/
{database}
/
collections
/
{collection_id}
/
functions
/
attach
Attach function
curl --request POST \
  --url https://api.trychroma.com/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/functions/attach \
  --header 'Content-Type: application/json' \
  --header 'x-chroma-token: <api-key>' \
  --data '
{
  "function_id": "1e30d217-3d78-4f8c-b244-79381dc6a254",
  "name": "my_function",
  "output_collection": "output_collection_name",
  "params": {}
}
'
{
  "attached_function": {
    "function_name": "<string>",
    "id": "<string>",
    "name": "<string>"
  },
  "created": true
}

Authorizations

x-chroma-token
string
header
required

Path Parameters

tenant
string
required

Tenant UUID

database
string
required

Database name

collection_id
string
required

Collection UUID

Body

application/json

Function attachment request

function_id
string
required
name
string
required
output_collection
string
required
params
any

Response

Function attached successfully

attached_function
object
required
created
boolean
required

True if newly created, false if already existed (idempotent request).