> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# API Key • Rust AI Agent SDK

> api_key: Set API key

# api\_key

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**EmbeddingConfig**](../classes/EmbeddingConfig) class in the [**embedding**](../modules/embedding) module.

Set API key

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def api_key(mut self, key: impl Into<String>) -> Self
```

## Parameters

<ParamField query="key" type="impl Into<String>" required={true}>
  No description available.
</ParamField>

### Returns

<ResponseField name="Returns" type="Self">
  The result of the operation.
</ResponseField>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Gateway" icon="tower-broadcast" href="/docs/rust/gateway" />

  <Card title="Rust Quickstart" icon="rocket" href="/docs/rust/quickstart" />
</CardGroup>
