> ## Documentation Index
> Fetch the complete documentation index at: https://developer.watson-orchestrate.ibm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Model



## OpenAPI

````yaml post /v1/models
openapi: 3.1.0
info:
  title: WxO Server API
  summary: API for the next gen watsonx Orchestrate stack
  description: >+

    The watsonx Orchestrate Server provides a set of APIs to power the watsonx
    Orchestrate AI assistant. This includes the following core services:


    * Orchestrate Assistant - a built-in AI assistant that powers the
    Orchestrate end-user experience.

    * Custom Assistants - a service layer for interacting with existing AI
    assistatns (such as those in watsonx Assistant).

    * Message Threads - a chat history and async message tracking store.

    * Document Store - manage collections of documents in nearly any format
    including text, pdf, html and many more.

    * Information Extraction - automatically extract clean text and images from
    any document in the Document Store.  Also extract other useful metadata like
    questions answered, keywords, and named entities.

    * Embedding - generate vector embeddings for text and images in the Document
    Store.

    * Vector Index and Retrieval - automatically index documents with rich
    metadata for vector search or hybrid search.

    * Search Engine - create a Gen AI powered search engine that works like Bing
    or Google.

    * Query Engine - configure your own RAG (Retrieval Augmented Generation)
    engine supporting advanced retrieval patterns and automated data management.

    * Model Proxy - create your own LLM model endpoints for chat completions and
    embeddings.  Supports IBM watsonx.ai, IBM BAM, OpenAI, MistralAI, or Ollama
    for local models.


    WxO API Server utilizes the following open source projects:


    * [PostgreSQL](https://www.postgresql.org/)

    * [PGVector](https://github.com/pgvector/pgvector)

    * [LlamaIndex](https://docs.llamaindex.ai/en/stable/)

    * [LangChain](https://python.langchain.com/docs/get_started/introduction)

    * [FastAPI](https://fastapi.tiangolo.com/)

    * [Unstructured](https://unstructured.io/)

    * [Celery](https://docs.celeryproject.org/en/stable/)

  version: 0.1.0
servers:
  - url: https://{api_endpoint}
    description: version
security: []
paths:
  /v1/models:
    post:
      tags:
        - Models
      summary: Create Model
      operationId: Create_Model_v1_models_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateModelInput'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    CreateModelInput:
      properties:
        name:
          type: string
          title: Name
        display_name:
          type: string
          title: Display Name
        provider_config:
          $ref: '#/components/schemas/Options'
        config:
          anyOf:
            - $ref: '#/components/schemas/ModelConfig-Input'
            - type: 'null'
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
        model_type:
          $ref: '#/components/schemas/wo_archer__schema__models__ModelType'
          default: chat
        connection_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Connection Id
      type: object
      required:
        - name
        - display_name
        - provider_config
      title: CreateModelInput
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Options:
      properties:
        api_key:
          type: string
          title: Api Key
          default: Dummy
        urlToFetch:
          anyOf:
            - type: string
            - type: 'null'
          title: Urltofetch
        resourceName:
          anyOf:
            - type: string
            - type: 'null'
          title: Resourcename
        deploymentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Deploymentid
        apiVersion:
          anyOf:
            - type: string
            - type: 'null'
          title: Apiversion
        adAuth:
          anyOf:
            - type: string
            - type: 'null'
          title: Adauth
        azureAuthMode:
          anyOf:
            - type: string
            - type: 'null'
          title: Azureauthmode
        azureManagedClientId:
          anyOf:
            - type: string
            - type: 'null'
          title: Azuremanagedclientid
        azureEntraClientId:
          anyOf:
            - type: string
            - type: 'null'
          title: Azureentraclientid
        azureEntraClientSecret:
          anyOf:
            - type: string
            - type: 'null'
          title: Azureentraclientsecret
        azureEntraTenantId:
          anyOf:
            - type: string
            - type: 'null'
          title: Azureentratenantid
        azureAdToken:
          anyOf:
            - type: string
            - type: 'null'
          title: Azureadtoken
        azureModelName:
          anyOf:
            - type: string
            - type: 'null'
          title: Azuremodelname
        workersAiAccountId:
          anyOf:
            - type: string
            - type: 'null'
          title: Workersaiaccountid
        customHost:
          anyOf:
            - type: string
            - type: 'null'
          title: Customhost
        forwardHeaders:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Forwardheaders
        index:
          anyOf:
            - type: integer
            - type: 'null'
          title: Index
        cache:
          anyOf:
            - type: string
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Cache
        metadata:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Metadata
        requestTimeout:
          anyOf:
            - type: integer
            - type: 'null'
          title: Requesttimeout
        transformToFormData:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Transformtoformdata
        awsSecretAccessKey:
          anyOf:
            - type: string
            - type: 'null'
          title: Awssecretaccesskey
        awsAccessKeyId:
          anyOf:
            - type: string
            - type: 'null'
          title: Awsaccesskeyid
        awsSessionToken:
          anyOf:
            - type: string
            - type: 'null'
          title: Awssessiontoken
        awsRegion:
          anyOf:
            - type: string
            - type: 'null'
          title: Awsregion
        awsAuthType:
          anyOf:
            - type: string
            - type: 'null'
          title: Awsauthtype
        awsRoleArn:
          anyOf:
            - type: string
            - type: 'null'
          title: Awsrolearn
        awsExternalId:
          anyOf:
            - type: string
            - type: 'null'
          title: Awsexternalid
        awsS3Bucket:
          anyOf:
            - type: string
            - type: 'null'
          title: Awss3Bucket
        awsS3ObjectKey:
          anyOf:
            - type: string
            - type: 'null'
          title: Awss3Objectkey
        awsBedrockModel:
          anyOf:
            - type: string
            - type: 'null'
          title: Awsbedrockmodel
        awsServerSideEncryption:
          anyOf:
            - type: string
            - type: 'null'
          title: Awsserversideencryption
        awsServerSideEncryptionKMSKeyId:
          anyOf:
            - type: string
            - type: 'null'
          title: Awsserversideencryptionkmskeyid
        amznSagemakerCustomAttributes:
          anyOf:
            - type: string
            - type: 'null'
          title: Amznsagemakercustomattributes
        amznSagemakerTargetModel:
          anyOf:
            - type: string
            - type: 'null'
          title: Amznsagemakertargetmodel
        amznSagemakerTargetVariant:
          anyOf:
            - type: string
            - type: 'null'
          title: Amznsagemakertargetvariant
        amznSagemakerTargetContainerHostname:
          anyOf:
            - type: string
            - type: 'null'
          title: Amznsagemakertargetcontainerhostname
        amznSagemakerInferenceId:
          anyOf:
            - type: string
            - type: 'null'
          title: Amznsagemakerinferenceid
        amznSagemakerEnableExplanations:
          anyOf:
            - type: string
            - type: 'null'
          title: Amznsagemakerenableexplanations
        amznSagemakerInferenceComponent:
          anyOf:
            - type: string
            - type: 'null'
          title: Amznsagemakerinferencecomponent
        amznSagemakerSessionId:
          anyOf:
            - type: string
            - type: 'null'
          title: Amznsagemakersessionid
        amznSagemakerModelName:
          anyOf:
            - type: string
            - type: 'null'
          title: Amznsagemakermodelname
        stabilityClientId:
          anyOf:
            - type: string
            - type: 'null'
          title: Stabilityclientid
        stabilityClientUserId:
          anyOf:
            - type: string
            - type: 'null'
          title: Stabilityclientuserid
        stabilityClientVersion:
          anyOf:
            - type: string
            - type: 'null'
          title: Stabilityclientversion
        huggingfaceBaseUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Huggingfacebaseurl
        vertexRegion:
          anyOf:
            - type: string
            - type: 'null'
          title: Vertexregion
        vertexProjectId:
          anyOf:
            - type: string
            - type: 'null'
          title: Vertexprojectid
        vertexServiceAccountJson:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Vertexserviceaccountjson
        vertexStorageBucketName:
          anyOf:
            - type: string
            - type: 'null'
          title: Vertexstoragebucketname
        vertexModelName:
          anyOf:
            - type: string
            - type: 'null'
          title: Vertexmodelname
        filename:
          anyOf:
            - type: string
            - type: 'null'
          title: Filename
        afterRequestHooks:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Afterrequesthooks
        beforeRequestHooks:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Beforerequesthooks
        defaultInputGuardrails:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Defaultinputguardrails
        defaultOutputGuardrails:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Defaultoutputguardrails
        openaiProject:
          anyOf:
            - type: string
            - type: 'null'
          title: Openaiproject
        openaiOrganization:
          anyOf:
            - type: string
            - type: 'null'
          title: Openaiorganization
        openaiBeta:
          anyOf:
            - type: string
            - type: 'null'
          title: Openaibeta
        azureDeploymentName:
          anyOf:
            - type: string
            - type: 'null'
          title: Azuredeploymentname
        azureApiVersion:
          anyOf:
            - type: string
            - type: 'null'
          title: Azureapiversion
        azureExtraParams:
          anyOf:
            - type: string
            - type: 'null'
          title: Azureextraparams
        azureFoundryUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Azurefoundryurl
        strictOpenAiCompliance:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Strictopenaicompliance
          default: false
        mistralFimCompletion:
          anyOf:
            - type: string
            - type: 'null'
          title: Mistralfimcompletion
        anthropicBeta:
          anyOf:
            - type: string
            - type: 'null'
          title: Anthropicbeta
        anthropicVersion:
          anyOf:
            - type: string
            - type: 'null'
          title: Anthropicversion
        fireworksAccountId:
          anyOf:
            - type: string
            - type: 'null'
          title: Fireworksaccountid
        snowflakeAccount:
          anyOf:
            - type: string
            - type: 'null'
          title: Snowflakeaccount
        watsonxVersion:
          anyOf:
            - type: string
            - type: 'null'
          title: Watsonxversion
        watsonxSpaceId:
          anyOf:
            - type: string
            - type: 'null'
          title: Watsonxspaceid
        watsonxProjectId:
          anyOf:
            - type: string
            - type: 'null'
          title: Watsonxprojectid
        watsonxDeploymentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Watsonxdeploymentid
        watsonxCpdUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Watsonxcpdurl
        watsonxCpdUsername:
          anyOf:
            - type: string
            - type: 'null'
          title: Watsonxcpdusername
        watsonxCpdPassword:
          anyOf:
            - type: string
            - type: 'null'
          title: Watsonxcpdpassword
      additionalProperties: false
      type: object
      title: Options
    ModelConfig-Input:
      properties:
        decoding_method:
          anyOf:
            - type: string
            - type: 'null'
          title: Decoding Method
        prompt:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
          title: Prompt
        max_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Tokens
        max_completion_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Completion Tokens
        temperature:
          anyOf:
            - type: number
            - type: 'null'
          title: Temperature
        top_p:
          anyOf:
            - type: number
            - type: 'null'
          title: Top P
        'n':
          anyOf:
            - type: integer
            - type: 'null'
          title: 'N'
        stream:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Stream
        logprobs:
          anyOf:
            - type: integer
            - type: 'null'
          title: Logprobs
        top_logprobs:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Top Logprobs
        echo:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Echo
        stop:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
          title: Stop
        presence_penalty:
          anyOf:
            - type: number
            - type: 'null'
          title: Presence Penalty
        frequency_penalty:
          anyOf:
            - type: number
            - type: 'null'
          title: Frequency Penalty
        best_of:
          anyOf:
            - type: integer
            - type: 'null'
          title: Best Of
        logit_bias:
          anyOf:
            - additionalProperties:
                type: number
              type: object
            - type: 'null'
          title: Logit Bias
        user:
          anyOf:
            - type: string
            - type: 'null'
          title: User
        context:
          anyOf:
            - type: string
            - type: 'null'
          title: Context
        examples:
          anyOf:
            - items:
                $ref: '#/components/schemas/Examples'
              type: array
            - type: 'null'
          title: Examples
        top_k:
          anyOf:
            - type: integer
            - type: 'null'
          title: Top K
        response_format:
          anyOf:
            - $ref: '#/components/schemas/ResponseFormat'
            - type: 'null'
        seed:
          anyOf:
            - type: integer
            - type: 'null'
          title: Seed
        store:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Store
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
        modalities:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Modalities
        audio:
          anyOf:
            - $ref: '#/components/schemas/AudioConfig'
            - type: 'null'
        service_tier:
          anyOf:
            - type: string
            - type: 'null'
          title: Service Tier
        prediction:
          anyOf:
            - $ref: '#/components/schemas/Prediction'
            - type: 'null'
        safety_settings:
          anyOf:
            - {}
            - type: 'null'
          title: Safety Settings
        anthropic_beta:
          anyOf:
            - type: string
            - type: 'null'
          title: Anthropic Beta
        anthropic_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Anthropic Version
        thinking:
          anyOf:
            - $ref: '#/components/schemas/Thinking'
            - type: 'null'
        space_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Space Id
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Id
        reasoning_effort:
          anyOf:
            - type: string
            - type: 'null'
          title: Reasoning Effort
      additionalProperties: false
      type: object
      title: ModelConfig
    wo_archer__schema__models__ModelType:
      type: string
      enum:
        - chat
        - chat_vision
        - completion
        - embedding
      title: ModelType
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    Examples:
      properties:
        input:
          title: Input
        output:
          title: Output
      type: object
      required:
        - input
        - output
      title: Examples
    ResponseFormat:
      properties:
        type:
          type: string
          title: Type
        json_schema:
          anyOf:
            - {}
            - type: 'null'
          title: Json Schema
      type: object
      required:
        - type
      title: ResponseFormat
    AudioConfig:
      properties:
        voice:
          type: string
          title: Voice
        format:
          type: string
          title: Format
      type: object
      required:
        - voice
        - format
      title: AudioConfig
    Prediction:
      properties:
        type:
          type: string
          title: Type
        content:
          anyOf:
            - items:
                $ref: '#/components/schemas/PredictionContent'
              type: array
            - type: string
          title: Content
      type: object
      required:
        - type
        - content
      title: Prediction
    Thinking:
      properties:
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
        budget_tokens:
          type: integer
          title: Budget Tokens
      type: object
      required:
        - budget_tokens
      title: Thinking
    PredictionContent:
      properties:
        type:
          type: string
          title: Type
        text:
          type: string
          title: Text
      type: object
      required:
        - type
        - text
      title: PredictionContent
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````