// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.js` to generate the docs examples

[source, js]
----
const response = await client.inference.put({
  task_type: "completion",
  inference_id: "anthropic_completion",
  inference_config: {
    service: "anthropic",
    service_settings: {
      api_key: "<api_key>",
      model_id: "<model_id>",
    },
    task_settings: {
      max_tokens: 1024,
    },
  },
});
console.log(response);
----
