CreateEndpointRequest¶
- class baseten.client.managementapi.CreateEndpointRequest(*, slug, region=SharedEndpointRegion.UNRESTRICTED, targets)¶
Bases:
BaseModel- Parameters:
slug (Annotated[str, FieldInfo(annotation=NoneType, required=True, title='Slug', description="Globally-unique slug of the form '{org_prefix}/{name}'.", examples=['baseten/mymodel-4'])])
region (Annotated[SharedEndpointRegion, FieldInfo(annotation=NoneType, required=True, description='Region the new routing serves.')])
targets (Annotated[list[EndpointTargetRequest], FieldInfo(annotation=NoneType, required=True, title='Targets', description="The endpoint's upstream targets. Exactly one target is supported at this time.", examples=[[{'environment_name': 'staging', 'model_id': '3kZ9xqd', 'provider': 'BASETEN', 'target_model': 'custom/model-name'}], [{'provider': 'OPENAI', 'secret_id': '3kZ9xqd', 'target_model': 'gpt-4o'}], [{'base_url': 'https://my-vllm.example.com', 'provider': 'OPENAI_COMPATIBLE', 'secret_id': '3kZ9xqd', 'target_model': 'my-model'}]], metadata=[MinLen(min_length=1), MaxLen(max_length=1)])])
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].