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

# Schema

Retrieve the schema with the given name.


## OpenAPI

````yaml GET /schemas/{name}
openapi: 3.1.0
info:
  title: Garden API
  version: 2.0.0
  description: API specification for various endpoints.
servers:
  - url: https://{environment}.garden.finance/v2
    variables:
      environment:
        default: api
        enum:
          - api
          - testnet.api
security:
  - garden-app-id: []
paths:
  /schemas/{name}:
    get:
      summary: Get contract schema.
      parameters:
        - in: path
          name: name
          required: true
          schema:
            $ref: '#/components/schemas/SchemaName'
      responses:
        '200':
          description: The ABI for EVM contracts or IDL for Solana contracts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SchemaResponse'
components:
  schemas:
    SchemaName:
      oneOf:
        - $ref: '#/components/schemas/HTLCSchemaName'
        - $ref: '#/components/schemas/TokenSchemaName'
    SchemaResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - type: object
          properties:
            result:
              $ref: '#/components/schemas/Schema'
    HTLCSchemaName:
      type: string
      title: htlc
      enum:
        - evm:htlc_erc20
        - evm:htlc
        - solana:htlc
        - starknet:htlc_erc20
        - solana:htlc_spltoken
    TokenSchemaName:
      type: string
      title: token
      enum:
        - evm:erc20
        - starknet:erc20
    Response:
      type: object
      properties:
        status:
          type: string
          enum:
            - Ok
            - Error
        error:
          type: string
          nullable: true
    Schema:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/SchemaName'
        schema:
          type: array
          items:
            type: object
  securitySchemes:
    garden-app-id:
      type: apiKey
      name: garden-app-id
      in: header
      description: >-
        If you do not yet have an app ID, please follow these
        [steps](/api-reference/setup).

````