@@ -5985,6 +5985,38 @@ components:
59855985 required:
59865986 - data
59875987 type: object
5988+ CreatePresetFromInferenceResponse:
5989+ description: Response containing the created preset with its designated version.
5990+ example:
5991+ data:
5992+ created_at: '2026-04-20T10:00:00Z'
5993+ creator_user_id: user_2dHFtVWx2n56w6HkM0000000000
5994+ description: null
5995+ designated_version:
5996+ config:
5997+ model: openai/gpt-4o
5998+ temperature: 0.7
5999+ created_at: '2026-04-20T10:00:00Z'
6000+ creator_id: user_2dHFtVWx2n56w6HkM0000000000
6001+ id: 550e8400-e29b-41d4-a716-446655440000
6002+ preset_id: 650e8400-e29b-41d4-a716-446655440001
6003+ system_prompt: You are a helpful assistant.
6004+ updated_at: '2026-04-20T10:00:00Z'
6005+ version: 1
6006+ designated_version_id: 550e8400-e29b-41d4-a716-446655440000
6007+ id: 650e8400-e29b-41d4-a716-446655440001
6008+ name: my-preset
6009+ slug: my-preset
6010+ status: active
6011+ status_updated_at: null
6012+ updated_at: '2026-04-20T10:00:00Z'
6013+ workspace_id: 750e8400-e29b-41d4-a716-446655440002
6014+ properties:
6015+ data:
6016+ $ref: '#/components/schemas/PresetWithDesignatedVersion'
6017+ required:
6018+ - data
6019+ type: object
59886020 CreateWorkspaceRequest:
59896021 example:
59906022 default_image_model: openai/dall-e-3
@@ -15093,6 +15125,123 @@ components:
1509315125 routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if
1509415126 it meets the threshold.
1509515127 example: 100
15128+ PresetDesignatedVersion:
15129+ description: A specific version of a preset, containing config and optional system prompt.
15130+ example:
15131+ config:
15132+ model: openai/gpt-4o
15133+ temperature: 0.7
15134+ created_at: '2026-04-20T10:00:00Z'
15135+ creator_id: user_2dHFtVWx2n56w6HkM0000000000
15136+ id: 550e8400-e29b-41d4-a716-446655440000
15137+ preset_id: 650e8400-e29b-41d4-a716-446655440001
15138+ system_prompt: You are a helpful assistant.
15139+ updated_at: '2026-04-20T10:00:00Z'
15140+ version: 1
15141+ nullable: true
15142+ properties:
15143+ config:
15144+ additionalProperties:
15145+ nullable: true
15146+ type: object
15147+ created_at:
15148+ type: string
15149+ creator_id:
15150+ type: string
15151+ id:
15152+ type: string
15153+ preset_id:
15154+ type: string
15155+ system_prompt:
15156+ nullable: true
15157+ type: string
15158+ updated_at:
15159+ type: string
15160+ version:
15161+ type: integer
15162+ required:
15163+ - id
15164+ - preset_id
15165+ - creator_id
15166+ - version
15167+ - system_prompt
15168+ - config
15169+ - created_at
15170+ - updated_at
15171+ type: object
15172+ PresetWithDesignatedVersion:
15173+ description: A preset with its currently designated version.
15174+ example:
15175+ created_at: '2026-04-20T10:00:00Z'
15176+ creator_user_id: user_2dHFtVWx2n56w6HkM0000000000
15177+ description: null
15178+ designated_version:
15179+ config:
15180+ model: openai/gpt-4o
15181+ temperature: 0.7
15182+ created_at: '2026-04-20T10:00:00Z'
15183+ creator_id: user_2dHFtVWx2n56w6HkM0000000000
15184+ id: 550e8400-e29b-41d4-a716-446655440000
15185+ preset_id: 650e8400-e29b-41d4-a716-446655440001
15186+ system_prompt: You are a helpful assistant.
15187+ updated_at: '2026-04-20T10:00:00Z'
15188+ version: 1
15189+ designated_version_id: 550e8400-e29b-41d4-a716-446655440000
15190+ id: 650e8400-e29b-41d4-a716-446655440001
15191+ name: my-preset
15192+ slug: my-preset
15193+ status: active
15194+ status_updated_at: null
15195+ updated_at: '2026-04-20T10:00:00Z'
15196+ workspace_id: 750e8400-e29b-41d4-a716-446655440002
15197+ properties:
15198+ created_at:
15199+ type: string
15200+ creator_user_id:
15201+ nullable: true
15202+ type: string
15203+ description:
15204+ nullable: true
15205+ type: string
15206+ designated_version:
15207+ $ref: '#/components/schemas/PresetDesignatedVersion'
15208+ designated_version_id:
15209+ nullable: true
15210+ type: string
15211+ id:
15212+ type: string
15213+ name:
15214+ type: string
15215+ slug:
15216+ type: string
15217+ status:
15218+ enum:
15219+ - active
15220+ - disabled
15221+ - archived
15222+ type: string
15223+ status_updated_at:
15224+ nullable: true
15225+ type: string
15226+ updated_at:
15227+ type: string
15228+ workspace_id:
15229+ nullable: true
15230+ type: string
15231+ required:
15232+ - id
15233+ - creator_user_id
15234+ - workspace_id
15235+ - name
15236+ - slug
15237+ - description
15238+ - status
15239+ - designated_version_id
15240+ - created_at
15241+ - updated_at
15242+ - status_updated_at
15243+ - designated_version
15244+ type: object
1509615245 Preview_20250311_WebSearchServerTool:
1509715246 description: Web search preview tool configuration (2025-03-11 version)
1509815247 example:
@@ -25482,6 +25631,132 @@ paths:
2548225631 outputs:
2548325632 results: $.data
2548425633 type: offsetLimit
25634+ /presets/{slug}/chat/completions:
25635+ post:
25636+ description: >-
25637+ Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap
25638+ with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored.
25639+ operationId: createPresetsChatCompletions
25640+ parameters:
25641+ - description: URL-safe slug identifying the preset. Created if it does not exist.
25642+ in: path
25643+ name: slug
25644+ required: true
25645+ schema:
25646+ description: URL-safe slug identifying the preset. Created if it does not exist.
25647+ example: my-preset
25648+ minLength: 1
25649+ type: string
25650+ requestBody:
25651+ content:
25652+ application/json:
25653+ example:
25654+ messages:
25655+ - content: You are a helpful assistant.
25656+ role: system
25657+ - content: Hello!
25658+ role: user
25659+ model: openai/gpt-4o
25660+ temperature: 0.7
25661+ schema:
25662+ $ref: '#/components/schemas/ChatRequest'
25663+ required: true
25664+ responses:
25665+ '200':
25666+ content:
25667+ application/json:
25668+ example:
25669+ data:
25670+ created_at: '2026-04-20T10:00:00Z'
25671+ creator_user_id: user_2dHFtVWx2n56w6HkM0000000000
25672+ description: null
25673+ designated_version:
25674+ config:
25675+ model: openai/gpt-4o
25676+ temperature: 0.7
25677+ created_at: '2026-04-20T10:00:00Z'
25678+ creator_id: user_2dHFtVWx2n56w6HkM0000000000
25679+ id: 550e8400-e29b-41d4-a716-446655440000
25680+ preset_id: 650e8400-e29b-41d4-a716-446655440001
25681+ system_prompt: You are a helpful assistant.
25682+ updated_at: '2026-04-20T10:00:00Z'
25683+ version: 1
25684+ designated_version_id: 550e8400-e29b-41d4-a716-446655440000
25685+ id: 650e8400-e29b-41d4-a716-446655440001
25686+ name: my-preset
25687+ slug: my-preset
25688+ status: active
25689+ status_updated_at: null
25690+ updated_at: '2026-04-20T10:00:00Z'
25691+ workspace_id: 750e8400-e29b-41d4-a716-446655440002
25692+ schema:
25693+ $ref: '#/components/schemas/CreatePresetFromInferenceResponse'
25694+ description: Preset created or updated successfully.
25695+ '400':
25696+ content:
25697+ application/json:
25698+ example:
25699+ error:
25700+ code: 400
25701+ message: Invalid request parameters
25702+ schema:
25703+ $ref: '#/components/schemas/BadRequestResponse'
25704+ description: Bad Request - Invalid request parameters or malformed input
25705+ '401':
25706+ content:
25707+ application/json:
25708+ example:
25709+ error:
25710+ code: 401
25711+ message: Missing Authentication header
25712+ schema:
25713+ $ref: '#/components/schemas/UnauthorizedResponse'
25714+ description: Unauthorized - Authentication required or invalid credentials
25715+ '403':
25716+ content:
25717+ application/json:
25718+ example:
25719+ error:
25720+ code: 403
25721+ message: Only management keys can perform this operation
25722+ schema:
25723+ $ref: '#/components/schemas/ForbiddenResponse'
25724+ description: Forbidden - Authentication successful but insufficient permissions
25725+ '404':
25726+ content:
25727+ application/json:
25728+ example:
25729+ error:
25730+ code: 404
25731+ message: Resource not found
25732+ schema:
25733+ $ref: '#/components/schemas/NotFoundResponse'
25734+ description: Not Found - Resource does not exist
25735+ '409':
25736+ content:
25737+ application/json:
25738+ example:
25739+ error:
25740+ code: 409
25741+ message: Resource conflict. Please try again later.
25742+ schema:
25743+ $ref: '#/components/schemas/ConflictResponse'
25744+ description: Conflict - Resource conflict or concurrent modification
25745+ '500':
25746+ content:
25747+ application/json:
25748+ example:
25749+ error:
25750+ code: 500
25751+ message: Internal Server Error
25752+ schema:
25753+ $ref: '#/components/schemas/InternalServerResponse'
25754+ description: Internal Server Error - Unexpected server error
25755+ security:
25756+ - apiKey: []
25757+ summary: Create a preset from a chat-completions request body
25758+ tags:
25759+ - Presets
2548525760 /providers:
2548625761 get:
2548725762 operationId: listProviders
@@ -27519,6 +27794,8 @@ tags:
2751927794 name: Observability
2752027795 - description: Organization endpoints
2752127796 name: Organization
27797+ - description: Presets endpoints
27798+ name: Presets
2752227799 - description: Provider information endpoints
2752327800 name: Providers
2752427801 - description: Rerank endpoints
0 commit comments