// 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: "rerank",
  inference_id: "cohere-rerank",
  inference_config: {
    service: "cohere",
    service_settings: {
      api_key: "<API-KEY>",
      model_id: "rerank-english-v3.0",
    },
    task_settings: {
      top_n: 10,
      return_documents: true,
    },
  },
});
console.log(response);
----
