// This file is autogenerated, DO NOT EDIT
// inference/post-inference.asciidoc:138

[source, python]
----
resp = client.inference.inference(
    task_type="rerank",
    inference_id="cohere_rerank",
    input=[
        "luke",
        "like",
        "leia",
        "chewy",
        "r2d2",
        "star",
        "wars"
    ],
    query="star wars main character",
)
print(resp)
----
