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

# Get LLM Provider

Get configuration for a specific LLM provider.

## Path Parameters

| Parameter | Type   | Required | Description                                                       |
| --------- | ------ | -------- | ----------------------------------------------------------------- |
| provider  | string | yes      | The provider to fetch configuration for (e.g., openai, anthropic) |

## Response Examples

### Success Response

```json theme={null}
{
  "provider": "openai",
  "enabled": true,
  "credentials": {
    "api_key": "sk-***",
    "organization": "org-***"
  }
}
```

### Provider Not Found

```json theme={null}
{
  "error": {
    "code": "NOT_FOUND",
    "message": "No configuration found for provider: openai"
  }
}
```


## OpenAPI

````yaml GET /v1/llm-provider/{provider}
openapi: 3.1.0
info:
  title: re-factor API Reference
  version: 1.0.0
  description: API specification for re-factor system based on schema definitions
servers: []
security:
  - BearerAuth: []
paths:
  /v1/llm-provider/{provider}:
    get:
      summary: Get LLM provider configuration
      parameters:
        - name: provider
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/LLMProvidersEnum'
          description: The LLM provider to fetch configuration for
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LLMProviderConfig'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    LLMProvidersEnum:
      type: string
      enum:
        - openai
        - anthropic
        - google
        - google-vertex
        - azure
        - amazon-bedrock
        - xai
      description: The provider to use for LLM access
    LLMProviderConfig:
      type: object
      properties:
        provider:
          $ref: '#/components/schemas/LLMProvidersEnum'
        enabled:
          type: boolean
          description: Whether the provider is enabled
        credentials:
          type: object
          additionalProperties: true
          description: The credentials for the provider
  responses:
    UnauthorizedError:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
    ForbiddenError:
      description: Forbidden
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
    NotFoundError:
      description: Not Found
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
    InternalError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````