---
title: "Save model config"
method: POST
path: "/api/model_config/{model}"
tags: ["modelconfig"]
---

# Save model config

`POST /api/model_config/{model}`

Saves a model config

## Request body

- ControllerSaveModelConfigsRequest
  - `config` object
  - `created_at` string
  - `exclude_from_tests` boolean
  - `force_save_detail` boolean
  - `max_image_generation_count` integer
  - `max_video_generation_count` integer
  - `max_video_generation_seconds` integer
  - `model` string
  - `owner` 'openai' | 'alibaba' | 'tencent' | 'xunfei' | 'deepseek' | 'moonshot' | 'minimax' | 'baidu' | 'google' | 'baai' | 'funaudiollm' | 'doubao' | 'fishaudio' | 'chatglm' | 'stabilityai' | 'netease' | 'ai360' | 'anthropic' | 'meta' | 'baichuan' | 'mistral' | 'openchat' | 'microsoft' | 'defog' | 'nexusflow' | 'cohere' | 'huggingface' | 'lingyiwanwu' | 'stepfun' | 'xai' | 'doc2x' | 'jina' | 'antgroup'
  - `plugin` object
  - `price` ModelPrice
    - `audio_input_price` number
    - `audio_input_price_unit` integer
    - `audio_output_price` number
    - `audio_output_price_unit` integer
    - `cache_creation_price` number
    - `cache_creation_price_unit` integer
    - `cached_price` number
    - `cached_price_unit` integer
    - `conditional_prices` ModelConditionalPrice[]
      - `condition` ModelPriceCondition
        - `daily_end_time` string — HH:mm, exclusive; earlier than start crosses midnight
        - `daily_start_time` string — HH:mm, inclusive
        - `end_time` integer — Unix timestamp, 0 means no end limit
        - `input_token_max` integer
        - `input_token_min` integer
        - `output_token_max` integer
        - `output_token_min` integer
        - `quality` string[]
        - `resolution` string[]
        - `service_tier` string
        - `start_time` integer — Unix timestamp, 0 means no start limit
        - `timezone` string — IANA timezone for the daily time range
      - `price` ModelPrice — recursive
    - `image_input_price` number
    - `image_input_price_unit` integer
    - `image_output_price` number
    - `image_output_price_unit` integer
    - `input_price` number
    - `input_price_unit` integer
    - `output_price` number
    - `output_price_unit` integer
    - `per_request_price` number
    - `thinking_mode_output_price` number — when ThinkingModeOutputPrice and ReasoningTokens are not 0, OutputPrice and OutputPriceUnit will be overwritten
    - `thinking_mode_output_price_unit` integer
    - `video_input_price` number
    - `video_input_price_unit` integer
    - `web_search_price` number
    - `web_search_price_unit` integer
  - `request_body_storage_max_size` integer
  - `response_body_storage_max_size` integer
  - `retry_times` integer
  - `rpm` integer
  - `summary_claude_long_context` boolean
  - `summary_service_tier` boolean
  - `timeout_config` ModelTimeoutConfig
    - `request_timeout` integer
    - `stream_request_timeout` integer
  - `tpm` integer
  - `type` 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30
  - `updated_at` string

## Response `200`

OK

- MiddlewareAPIResponse
  - `data` unknown
  - `message` string
  - `success` boolean

---

[API](https://skmtc.net/labring/apis/ai-proxy-swagger-api.md) · [All operations](https://skmtc.net/labring/apis/ai-proxy-swagger-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/labring/ai-proxy-swagger-api/revisions/696faf563b42/schema)
