> For the complete documentation index, see [llms.txt](https://saptiva.gitbook.io/saptiva-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://saptiva.gitbook.io/saptiva-docs/comienza/quickstart.md).

# Quickstart

La **API** de **Saptiva** te permite integrar **IA** en tus aplicaciones sin complicarte: genera texto (chat/completions), crea embeddings para búsqueda semántica y habilita arquitecturas **RAG**. En esta documentación verás cómo autenticarte, seleccionar modelos, ajustar parámetros (temperatura, longitud y formato), indexar contenidos con embeddings y aplicar buenas prácticas de latencia, cuotas y manejo de errores. Las capacidades disponibles dependen del modelo y del entorno (on-prem, nube privada o pública).

### Crea una API Key

<mark style="color:$primary;">Crea una API Key accediendo al</mark> [<mark style="color:green;">panel de control de nuestro Lab Saptiva</mark>](https://lab.saptiva.com/)  que usarás para acceder de forma segura a la API. En la parte superior izquierda encontrarás el botón.

<figure><img src="/files/tkSCkUTfTmX9wd4OU62n" alt=""><figcaption></figcaption></figure>

Guarda la clave en un lugar seguro, como un archivo [<mark style="color:green;">`.zshrc`</mark>](https://www.freecodecamp.org/news/how-do-zsh-configuration-files-work/) u otro archivo de texto en tu computadora. Una vez que hayas generado una clave API, expórtala como una variable de entorno en tu terminal.

{% tabs %}
{% tab title="Windows" %}

```bash
setx API_KEY "va-ai-618sfuC5Y..."
```

{% endtab %}

{% tab title="MacOS - Linux" %}

```bash
export API_KEY="va-ai-618sfuC5Y..."
```

{% endtab %}
{% endtabs %}

### Haz tu primera solicitud a la API

Con la API Key de Saptiva exportada como variable de entorno, [<mark style="color:green;">estás listo para realizar tu primera solicitud API</mark>](/saptiva-docs/basicos/api-reference.md). Puedes usar la API REST directamente con el cliente HTTP que elijas.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://saptiva.gitbook.io/saptiva-docs/comienza/quickstart.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
