Enable Model Access
Code Mode: praxis.model.models.access.update
HTTP: PUT /model/v1/models/{model}/access
Enable one model for your organization so a call to it is allowed. Call it when an inference request was refused with 403 MODEL_ACCESS_REQUIRED, or ahead of time for a model the catalog marks access_required: true; the refusal message and praxis.model.models.list name the model id to pass here. The id resolves exactly as a chat call resolves it, including any creator prefix such as deepseek/deepseek-v4-pro, and an id no catalog model carries answers 404 MODEL_NOT_FOUND. Enabling is organization-wide and needs no approval, and it is idempotent: a second call returns the first grant unchanged, keeping its author, its timestamp and the USD-per-million-token price snapshot it recorded then. Enabling a model that does not require access is allowed and makes no difference to gating.
签名
praxis.model.models.access.update(args:{path:{model:string}}):Promise<{/** The model id exactly as the caller passed it. */ model:string;/** Whether the catalog marks this model as needing access; false when the caller enabled an open model. */ access_required:boolean;/** Always true on this response: after the call the organization has the grant. */ granted:true;/** User who first enabled it, or "api-key" for an API key with no user identity. */ granted_by:string;/** RFC 3339 timestamp of the first enable; a repeated enable does not move it. */ granted_at:string;/** Sell price in USD per million input tokens, snapped when the grant was first created; null when the model has no input price. */ sell_input_price:number|null;/** Sell price in USD per million output tokens, snapped when the grant was first created; null when the model has no output price. */ sell_output_price:number|null}>;参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| model | path | string | 是 | Model ID as the catalog lists it, including any creator prefix; primary ids, aliases and prefixed ids resolve the same way a chat call resolves them. |
响应
| 状态码 | 内容类型 | 说明 |
|---|---|---|
| 200 | application/json | The grant now in effect for this organization; unchanged when it already existed |
| 400 | application/problem+json | Missing or empty model id; pass the model on the path. |
| 401 | application/problem+json | Missing or invalid API credentials; supply a valid platform API key in Authorization: Bearer. |
| 404 | application/problem+json | MODEL_NOT_FOUND: no catalog model carries this id; take the id from praxis.model.models.list or from the refusal message. |
| default | application/problem+json | Canonical problem |