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

# Post adminsettingtest llm

> Test LLM provider configuration



## OpenAPI

````yaml /swagger.json post /admin/setting/test-llm
openapi: 3.0.0
info:
  version: 1.0.0
  title: Teable App
  description: Manage Data as easy as drink a cup of tea
  x-logo:
    backgroundColor: '#F0F0F0'
    altText: Teable logo
servers:
  - url: https://app.teable.ai/api
security: []
paths:
  /admin/setting/test-llm:
    post:
      tags:
        - admin
        - setting
      description: Test LLM provider configuration
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - openai
                    - anthropic
                    - google
                    - azure
                    - cohere
                    - mistral
                    - deepseek
                    - qwen
                    - zhipu
                    - lingyiwanwu
                    - xai
                    - togetherai
                    - ollama
                    - amazonBedrock
                    - openRouter
                    - openaiCompatible
                    - aiGateway
                name:
                  type: string
                apiKey:
                  type: string
                baseUrl:
                  type: string
                  format: uri
                models:
                  type: string
                  default: ''
                modelKey:
                  type: string
                ability:
                  type: array
                  items:
                    type: string
                    enum:
                      - image
                      - pdf
                      - webSearch
                      - toolCall
                      - reasoning
                      - imageGeneration
                testImageGeneration:
                  type: boolean
                testImageToImage:
                  type: boolean
              required:
                - type
                - name
                - apiKey
                - baseUrl
      responses:
        '200':
          description: Test result
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  response:
                    type: string
                  ability:
                    type: object
                    properties:
                      image:
                        anyOf:
                          - type: boolean
                          - type: object
                            properties:
                              url:
                                type: boolean
                              base64:
                                type: boolean
                      pdf:
                        anyOf:
                          - type: boolean
                          - type: object
                            properties:
                              url:
                                type: boolean
                              base64:
                                type: boolean
                      webSearch:
                        type: boolean
                      toolCall:
                        type: boolean
                      reasoning:
                        type: boolean
                      imageGeneration:
                        type: boolean
                required:
                  - success
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request POST \
              --url https://app.teable.ai/api/admin/setting/test-llm \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"type":"openai","name":"string","apiKey":"string","baseUrl":"http://example.com","models":"","modelKey":"string","ability":["image"],"testImageGeneration":true,"testImageToImage":true}'
        - lang: JavaScript
          source: |-
            const url = 'https://app.teable.ai/api/admin/setting/test-llm';
            const options = {
              method: 'POST',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              },
              body: '{"type":"openai","name":"string","apiKey":"string","baseUrl":"http://example.com","models":"","modelKey":"string","ability":["image"],"testImageGeneration":true,"testImageToImage":true}'
            };

            try {
              const response = await fetch(url, options);
              const data = await response.json();
              console.log(data);
            } catch (error) {
              console.error(error);
            }
        - lang: Node.js
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'app.teable.ai',
              port: null,
              path: '/api/admin/setting/test-llm',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              type: 'openai',
              name: 'string',
              apiKey: 'string',
              baseUrl: 'http://example.com',
              models: '',
              modelKey: 'string',
              ability: ['image'],
              testImageGeneration: true,
              testImageToImage: true
            }));
            req.end();
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("app.teable.ai")


            payload =
            "{\"type\":\"openai\",\"name\":\"string\",\"apiKey\":\"string\",\"baseUrl\":\"http://example.com\",\"models\":\"\",\"modelKey\":\"string\",\"ability\":[\"image\"],\"testImageGeneration\":true,\"testImageToImage\":true}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("POST", "/api/admin/setting/test-llm", payload,
            headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````