Skip to content
中文

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.

Signature

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}>;

Parameters

NameInTypeRequiredDescription
modelpathstringyesModel 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.

Responses

StatusContent typesDescription
200application/jsonThe grant now in effect for this organization; unchanged when it already existed
400application/problem+jsonMissing or empty model id; pass the model on the path.
401application/problem+jsonMissing or invalid API credentials; supply a valid platform API key in Authorization: Bearer.
404application/problem+jsonMODEL_NOT_FOUND: no catalog model carries this id; take the id from praxis.model.models.list or from the refusal message.
defaultapplication/problem+jsonCanonical problem