> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wandb.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Créer un modèle

> Créer un objet de modèle.



## OpenAPI

````yaml /fr/weave/reference/service-api/openapi.json post /v2/{entity}/{project}/models
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /v2/{entity}/{project}/models:
    post:
      tags:
        - Models
      summary: Créer un modèle
      description: Créer un objet de modèle.
      operationId: model_create_v2__entity___project__models_post
      parameters:
        - in: path
          name: entity
          required: true
          schema:
            title: Entity
            type: string
        - in: path
          name: project
          required: true
          schema:
            title: Project
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModelCreateBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelCreateRes'
          description: Réponse réussie
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Erreur de validation
      security:
        - HTTPBasic: []
        - HTTPBearer: []
components:
  schemas:
    ModelCreateBody:
      properties:
        attributes:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: Attributs supplémentaires à stocker avec le modèle
          title: Attributes
        description:
          anyOf:
            - type: string
            - type: 'null'
          description: Une description de ce modèle
          title: Description
        name:
          description: >-
            Le nom de ce modèle. Les modèles portant le même nom seront
            versionnés ensemble.
          title: Name
          type: string
        source_code:
          description: Le code source complet de la classe Model, y compris les imports
          title: Source Code
          type: string
      required:
        - name
        - source_code
      title: ModelCreateBody
      type: object
    ModelCreateRes:
      properties:
        digest:
          description: L’empreinte du modèle créé
          title: Digest
          type: string
        model_ref:
          description: Référence complète du modèle créé
          title: Model Ref
          type: string
        object_id:
          description: L’ID du modèle créé
          title: Object Id
          type: string
        version_index:
          description: L’index de version du modèle créé
          title: Version Index
          type: integer
      required:
        - digest
        - object_id
        - version_index
        - model_ref
      title: ModelCreateRes
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    HTTPBasic:
      scheme: basic
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````