# Get Workspace Custom Models

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Get Workspace Custom Models"}
>
</Heading>

<MethodEndpoint
  method={"get"}
  path={"/api/v2/workspaces/{workspace_id}/models/custom"}
  context={"endpoint"}
>
  
</MethodEndpoint>

Returns workspace-scoped custom model definitions.

Supports OData ``$filter`` on ``name`` and ``provider``.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={[{"description":"Type the id of the workspace.","in":"path","name":"workspace_id","required":true,"schema":{"description":"Type the id of the workspace.","format":"uuid","title":"Workspace Id","type":"string"}},{"description":"The number of entries to display. Leaving this field empty keeps the default, and max 10 results are returned.","in":"query","name":"limit","required":false,"schema":{"default":10,"description":"The number of entries to display. Leaving this field empty keeps the default, and max 10 results are returned.","maximum":100,"title":"Limit","type":"integer"}},{"description":"Enter an ID if you want to see all entries before this ID. To use this option, clear the `page_number` parameter first.","in":"query","name":"before","required":false,"schema":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"description":"Enter an ID if you want to see all entries before this ID. To use this option, clear the `page_number` parameter first.","title":"Before"}},{"description":"Enter an ID if you want to see all entries after this ID. To use this option, clear the `page_number` parameter first.","in":"query","name":"after","required":false,"schema":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"description":"Enter an ID if you want to see all entries after this ID. To use this option, clear the `page_number` parameter first.","title":"After"}},{"description":"The number of the page you want to see.","in":"query","name":"page_number","required":false,"schema":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"description":"The number of the page you want to see.","title":"Page Number"}},{"description":"The name of the entity you want to sort by.","in":"query","name":"field","required":false,"schema":{"default":"created_at","description":"The name of the entity you want to sort by.","enum":["name","provider","created_at"],"title":"Field","type":"string"}},{"description":"Choose how you want to sort the results.","in":"query","name":"order","required":false,"schema":{"default":"DESC","description":"Choose how you want to sort the results.","enum":["ASC","DESC"],"title":"Order","type":"string"}},{"description":"The OData filter you want to use to in your query. It supports exact match and `AND` operations. For example, to filter for a metadata `category:news` and `published_date` greater than or equal to January 1 2025, here's what the URL could look like: 'url = \"https://api.cloud.deepset.ai/api/v1/workspaces/production/files?limit=10&filter=category eq 'news' and published_date ge '2025-01-01' \"'. OData filters only work with cursor-based pagination (leave the `page_number` field blank to enable it).To learn more about the OData filter syntax, see: [Querying Data](https://www.odata.org/getting-started/basic-tutorial/#queryData).","in":"query","name":"filter","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The OData filter you want to use to in your query. It supports exact match and `AND` operations. For example, to filter for a metadata `category:news` and `published_date` greater than or equal to January 1 2025, here's what the URL could look like: 'url = \"https://api.cloud.deepset.ai/api/v1/workspaces/production/files?limit=10&filter=category eq 'news' and published_date ge '2025-01-01' \"'. OData filters only work with cursor-based pagination (leave the `page_number` field blank to enable it).To learn more about the OData filter syntax, see: [Querying Data](https://www.odata.org/getting-started/basic-tutorial/#queryData).","title":"Filter"}}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={undefined}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"chat_generator_config":{"additionalProperties":true,"description":"The configuration for the chat generator as expected in a pipeline YAML","title":"Chat Generator Config","type":"object"},"connected":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the model is connected and ready to use (e.g., API key is set)","title":"Connected"},"created_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Timestamp when this model definition was created.","title":"Created At"},"created_by":{"anyOf":[{"properties":{"family_name":{"description":"Family name of a user.","title":"Family name","type":"string"},"given_name":{"description":"Given name of a user.","title":"Given name","type":"string"},"user_id":{"description":"Unique identifier of a user.","format":"uuid","title":"User ID","type":"string"}},"required":["given_name","family_name","user_id"],"title":"Oauth User","type":"object"},{"type":"null"}],"description":"The user who created this model definition."},"generation_kwargs":{"additionalProperties":true,"description":"The available generation kwargs for the model as OpenAPI schema","title":"Generation Kwargs","type":"object"},"last_updated_by":{"anyOf":[{"properties":{"family_name":{"description":"Family name of a user.","title":"Family name","type":"string"},"given_name":{"description":"Given name of a user.","title":"Given name","type":"string"},"user_id":{"description":"Unique identifier of a user.","format":"uuid","title":"User ID","type":"string"}},"required":["given_name","family_name","user_id"],"title":"Oauth User","type":"object"},{"type":"null"}],"description":"The user who last updated this model definition."},"model_id":{"description":"The unique identifier of the model available for the node.","format":"uuid","title":"Model Id","type":"string"},"name":{"description":"The name of the model, e.g., 'gpt-5' or 'Claude 4 Sonnet'","title":"Name","type":"string"},"origin":{"default":"PLATFORM","description":"Indicates if a model is a custom model saved in a workspace (WORKSPACE) or organization (ORGANIZATION) or a built-in model provided by the platform (PLATFORM).","enum":["WORKSPACE","ORGANIZATION","PLATFORM"],"title":"ModelOrigin","type":"string"},"provider":{"description":"The provider of the model, e.g., 'openai' or 'anthropic'","title":"Provider","type":"string"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Timestamp when this model definition was last updated.","title":"Updated At"}},"required":["model_id","name","provider","connected","chat_generator_config","generation_kwargs"],"title":"Model","type":"object"},"title":"Data","type":"array"},"has_more":{"description":"Indicates if there are more results to show.","title":"Has more results","type":"boolean"},"total":{"description":"The total number of results matching your query.","title":"Total number of results","type":"integer"}},"required":["data","has_more","total"],"title":"PaginatedResult[Model]","type":"object"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"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"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"}}},"description":"Validation Error"}}}
>
  
</StatusCodes>
