---
title: "Create Llm Configuration"
method: POST
path: "/v1/llm-configurations"
tags: ["LLM Configurations"]
---

# Create Llm Configuration

`POST /v1/llm-configurations`

Create a new LLM configuration for the authenticated user's space.

This endpoint:
- Requires API key or session authentication
- Validates that the secret_id belongs to the user's space
- Creates a new LLM configuration with the provided settings

Args:
    service: Injected LLM configuration service
    payload: Request containing url, display_name, model_name, and secret_id

Returns:
    Response with created LLM configuration

Raises:
    400 Bad Request: If user doesn't have an associated space or secret is invalid

## Cookies

- `la_session` string

## Request body

- CreateLLMConfigurationSchema — Request schema for creating a new LLM configuration
  - `base_url` string — The LLM API endpoint URL
  - `display_name` string, required — Display name for the configuration
  - `model_name` string, required — The model name to use
  - `secret_id` string, required — ID of the secret containing the API key

## Response `200`

Successful Response

- ResponseLLMConfigurationResponseSchema
  - `code` integer
  - `data` LLMConfigurationResponseSchema — Response schema for an LLM configuration
    - `id` string, required
    - `base_url` string, required
    - `display_name` string, required
    - `model_name` string, required
    - `secret_id` string, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
  - `message` string

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/liveavatar/apis/live-avatar-api.md) · [All operations](https://skmtc.net/liveavatar/apis/live-avatar-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/liveavatar/live-avatar-api/versions/fbfa5cdbd7f9/schema)
