> ## Documentation Index
> Fetch the complete documentation index at: https://docs.poly.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get function type definitions

> Returns generic Python type-stub boilerplate (e.g. the Conversation class) for IDE autocomplete when editing this function’s code. The same stub is returned for every function; it is not derived from this function’s own code.



## OpenAPI

````yaml api-reference/agents/openapi.json GET /v1/agents/{agentId}/branches/{branchId}/functions/{functionId}/type-definitions
openapi: 3.1.0
info:
  title: PolyAI Agents API
  version: 1.0.11
  description: Manage PolyAI agents, telephony, deployments, and real-time configs.
servers:
  - url: https://api.us.poly.ai
    description: US region
  - url: https://api.eu.poly.ai
    description: EU region
  - url: https://api.uk.poly.ai
    description: UK region
  - url: https://api.studio.poly.ai
    description: Studio region
security:
  - polyApiKey: []
paths:
  /v1/agents/{agentId}/branches/{branchId}/functions/{functionId}/type-definitions:
    parameters:
      - name: agentId
        in: path
        required: true
        schema:
          type: string
      - name: branchId
        in: path
        required: true
        schema:
          type: string
      - name: functionId
        in: path
        required: true
        schema:
          type: string
    get:
      tags:
        - Functions
      summary: Get Python type stubs for a function
      description: >-
        Returns generic Python type-stub boilerplate (e.g. the Conversation
        class) for IDE autocomplete when editing this function’s code. The same
        stub is returned for every function; it is not derived from this
        function’s own code.
      responses:
        '200':
          description: Type stub code
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FunctionTypeDefinitionsResponse'
        '404':
          description: Function not found
components:
  schemas:
    FunctionTypeDefinitionsResponse:
      title: FunctionTypeDefinitionsResponse
      description: >-
        Python type stubs (e.g. the Conversation class) for IDE autocomplete
        when editing this function.
      type: object
      properties:
        code:
          type: string
      required:
        - code
      additionalProperties: false
  securitySchemes:
    polyApiKey:
      type: apiKey
      in: header
      name: X-API-KEY

````