# ModelEndpoint

Source: https://docs.modelplane.ai/reference/modelendpoints/

A reachable inference endpoint, composed per replica or created manually for external providers.

Apply instances as `apiVersion: modelplane.ai/v1alpha1`, `kind: ModelEndpoint`.

[Concept guide: Route to External Providers](https://docs.modelplane.ai/models/model-endpoint/index.md)

## Example

```yaml
# ModelEndpoints are composed automatically by ModelDeployment.
# Create manually only to register an external inference endpoint.
apiVersion: modelplane.ai/v1alpha1
kind: ModelEndpoint
metadata:
  name: qwen-72b-replica-0
  namespace: ml-team
spec:
  url: http://10.0.1.50/ml-team/qwen-72b/
  rewritePath: /ml-team/qwen-72b/
```

## Definition

The CompositeResourceDefinition this reference is generated from, with the complete OpenAPI schema, validation rules, and defaults:

```yaml
apiVersion: apiextensions.crossplane.io/v2
kind: CompositeResourceDefinition
metadata:
  name: modelendpoints.modelplane.ai
spec:
  group: modelplane.ai
  names:
    categories: [crossplane, modelplane]
    kind: ModelEndpoint
    plural: modelendpoints
    shortNames: [me]
  scope: Namespaced
  versions:
  - name: v1alpha1
    served: true
    referenceable: true
    additionalPrinterColumns:
    - name: URL
      type: string
      jsonPath: .spec.url
    schema:
      openAPIV3Schema:
        type: object
        required: [spec]
        properties:
          spec:
            type: object
            required: [url]
            properties:
              url:
                type: string
                description: >-
                  URL of the inference endpoint. Used to configure
                  routing to this endpoint.
                minLength: 1
              rewritePath:
                type: string
                description: >-
                  Path prefix that requests should be rewritten to when
                  routed through this endpoint. Used by ModelService to
                  configure URLRewrite on its HTTPRoute. For Modelplane-
                  composed endpoints this is the per-replica serving path
                  on the remote cluster's gateway, e.g. /ml-team/qwen-demo/.
          status:
            type: object
            properties:
              routing:
                type: object
                description: >-
                  Routing details for this endpoint. ModelService reads
                  backendName to build HTTPRoute backendRefs.
                properties:
                  backendName:
                    type: string
                    description: >-
                      Crossplane-generated name of the Backend resource
                      composed by this endpoint.
              conditions:
                type: array
                items:
                  type: object
```
