---
title: "Get Function Definition"
method: GET
path: "/v1/functions/{function_name}/definition"
tags: ["functions"]
---

# Get Function Definition

`GET /v1/functions/{function_name}/definition`

Return the function definition that can be used directly by LLM.
The actual content depends on the intended model (inference provider, e.g., OpenAI, Anthropic, etc.) and the function itself.

## Path parameters

- `function_name` string, required

## Query parameters

- `inference_provider` 'openai' | 'anthropic'

## Response `200`

Successful Response

- union
  - OpenAIFunctionDefinition
    - `type` 'function'
    - `function` OpenAIFunction, required
      - `name` string, required
      - `strict` boolean, nullable
      - `description` string, required
      - `parameters` object, required
  - AnthropicFunctionDefinition
    - `name` string, required
    - `description` string, required
    - `input_schema` object, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/aci/apis/aipolabs.md) · [All operations](https://skmtc.net/aci/apis/aipolabs/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aci/aipolabs/revisions/718400d06fee/schema)
