---
title: "Create LLM provider"
method: POST
path: "/api/v1/llm-providers"
tags: ["LLM Providers"]
---

# Create LLM provider

`POST /api/v1/llm-providers`

## Request

- Base URL: `https://orchestrator.getaxonflow.com`
- URL: `https://orchestrator.getaxonflow.com/api/v1/llm-providers`
- Auth: none declared
- TypeScript: <https://skmtc.dev/getaxonflow/apis/axonflow-orchestrator-api/docs/api/v1/llm-providers/post.ts> (a function with typed inputs; its response is checked against the schema)

Register a new LLM provider. API keys can be provided directly
or via AWS Secrets Manager ARN for secure credential storage.

## Request body

- CreateLLMProviderRequest
  - `name` string, required: Unique provider name
  - `type` 'openai' | 'azure-openai' | 'anthropic' | 'bedrock' | 'ollama' | 'gemini' | 'custom', required
  - `api_key` string: API key (mutually exclusive with api_key_secret_arn)
  - `api_key_secret_arn` string: AWS Secrets Manager ARN for API key
  - `endpoint` string: API endpoint URL
  - `model` string: Default model name
  - `region` string: AWS region (for Bedrock)
  - `enabled` boolean
  - `priority` integer
  - `weight` integer
  - `rate_limit` integer: Max requests per second
  - `timeout_seconds` integer
  - `settings` object

## Response `201`

Provider created

- LLMProviderResponse
  - `provider` LLMProviderResource: LLM provider configuration
    - `name` string: Unique provider name
    - `type` 'openai' | 'azure-openai' | 'anthropic' | 'bedrock' | 'ollama' | 'gemini' | 'custom': Provider type
    - `endpoint` string: API endpoint URL
    - `model` string: Default model name
    - `region` string: AWS region (for Bedrock)
    - `enabled` boolean: Whether provider is enabled
    - `priority` integer: Routing priority (lower = higher priority)
    - `weight` integer: Routing weight for load balancing
    - `rate_limit` integer: Max requests per second
    - `timeout_seconds` integer: Request timeout in seconds
    - `has_api_key` boolean: Whether API key is configured (key not exposed)
    - `settings` object: Provider-specific settings
    - `health` LLMProviderHealthInfo: Provider health status
      - `status` 'healthy' | 'unhealthy' | 'unknown'
      - `message` string: Health check message
      - `last_checked` string, date-time: Last health check timestamp

## Other responses

- `400`: Invalid request (coded envelope)
- `401`: Unauthorized - missing or invalid organization scope (coded envelope)
- `409`: Provider already exists

---

[API](https://skmtc.dev/getaxonflow/apis/axonflow-orchestrator-api.md) - [All operations](https://skmtc.dev/getaxonflow/apis/axonflow-orchestrator-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getaxonflow/apis/axonflow-orchestrator-api/revisions/f408ef3ec9dd?raw)
