---
title: "Bulk Create Foundry Models"
method: POST
path: "/admin/foundry-models/bulk"
tags: ["admin"]
---

# Bulk Create Foundry Models

`POST /admin/foundry-models/bulk`

## Request

- Base URL: `https://api.oxlo.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.oxlo.ai/admin/foundry-models/bulk`
- Auth: HTTP bearer

Bulk create foundry models. Useful for seeding the database.
Models that already exist will be skipped.

## Request body

- FoundryModelBulkCreateRequest: Schema for bulk creating FoundryModels (for seeding).
  - `models` FoundryModelCreate[], required
    - `name` string, required: Display name for the model
    - `target_model` string, required: Target model name for API calls
    - `provider` string, required: Provider: 'azure', 't4'
    - `query_method` string, required: Query method: 'openai_chat', 'rest_flux-2-pro', etc.
    - `context_length` integer: Context window length (0 for non-LLM)
    - `quantization` string, nullable: Quantization: 'fp16', 'Q8_0', etc.
    - `gpu_requirement` string, nullable: GPU requirement: 'oxlo', 'A100', 'T4'
    - `tier` string: Access tier: 'free', 'pro', 'premium'
    - `owned_by` string: Owner: 'oxlo', 'worker-local'
    - `coming_soon` boolean: Whether the model is not yet available
    - `tags` string[], nullable: Tags for categorization
    - `size` string, nullable: Model size: '70B', 'unknown'
    - `category` string: Category: 'chat', 'image', 'audio', etc.
    - `description` string, nullable: Description for UI/docs
    - `rate_limit_requests` integer, nullable: Rate limit: requests per window
    - `rate_limit_tokens` integer, nullable: Rate limit: tokens per window
    - `rate_limit_window_seconds` integer, nullable: Rate limit window in seconds
    - `fallback_to_next_endpoint` boolean: Try next endpoint on rate limit
    - `testable_in_playground` boolean: Available in playground UI
    - `is_active` boolean: Whether model is active and loaded
    - `query_handler` string, nullable: Handler function name: 'openai_chat', 'flux_image', 'anthropic_messages', 'rest_generic'
    - `endpoint_config` object, nullable: Flexible endpoint configuration with endpoints, path, auth_type, timeout, etc.
    - `use_foundry_endpoints` boolean: If true, use Foundry endpoint rotation; if false, use endpoint_config.endpoints
    - `id` string, required: Model identifier like 'deepseek-r1-70b'

## Response `200`

Successful Response

- FoundryModelBulkCreateResponse: Response for bulk create operation.
  - `created` integer, required
  - `skipped` integer, required
  - `errors` string[], required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/oxlo/apis/oxlo-backend.md) - [All operations](https://skmtc.dev/oxlo/apis/oxlo-backend/llms.txt) - [OpenAPI document](https://skmtc.dev/oxlo/apis/oxlo-backend/revisions/bc2ecdc94f31?raw)
