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

# Gateway Quickstart

> Point your existing OpenAI client at HYRE — two lines of config, no other code changes.

Everything below assumes you already have a `hyre_gw_*` key — if not, [request access](https://docs.hyreagent.fun/gateway/get-access.md) first.

## Base configuration

```
Base URL:  https://gw.hyreagent.fun/api/inference/v1
API key:   hyre_gw_...   (sent as a Bearer token)
```

## Make a request

> [tab] curl
>
> ```bash theme={null}
> curl https://gw.hyreagent.fun/api/inference/v1/chat/completions \
>   -H "Authorization: Bearer $HYRE_GATEWAY_KEY" \
>   -H "Content-Type: application/json" \
>   -d '{
>     "model": "deepseek-ai/DeepSeek-V4-Flash",
>     "messages": [
>       { "role": "user", "content": "Explain impermanent loss in one paragraph." }
>     ],
>     "max_tokens": 300
>   }'
> ```

> [tab] Python (OpenAI SDK)
>
> ```python theme={null}
> from openai import OpenAI
>
> client = OpenAI(
>     base_url="https://gw.hyreagent.fun/api/inference/v1",
>     api_key=os.environ["HYRE_GATEWAY_KEY"],  # hyre_gw_...
> )
>
> response = client.chat.completions.create(
>     model="deepseek-ai/DeepSeek-V4-Flash",
>     messages=[
>         {"role": "user", "content": "Explain impermanent loss in one paragraph."}
>     ],
>     max_tokens=300,
> )
> print(response.choices[0].message.content)
> ```

> [tab] Node.js (OpenAI SDK)
>
> ```typescript theme={null}
> import OpenAI from 'openai'
>
> const client = new OpenAI({
>   baseURL: 'https://gw.hyreagent.fun/api/inference/v1',
>   apiKey: process.env.HYRE_GATEWAY_KEY, // hyre_gw_...
> })
>
> const response = await client.chat.completions.create({
>   model: 'deepseek-ai/DeepSeek-V4-Flash',
>   messages: [
>     { role: 'user', content: 'Explain impermanent loss in one paragraph.' },
>   ],
>   max_tokens: 300,
> })
> console.log(response.choices[0].message.content)
> ```

> [tab] Vercel AI SDK
>
> ```typescript theme={null}
> import { createOpenAICompatible } from '@ai-sdk/openai-compatible'
> import { generateText } from 'ai'
>
> const hyre = createOpenAICompatible({
>   name: 'hyre',
>   baseURL: 'https://gw.hyreagent.fun/api/inference/v1',
>   apiKey: process.env.HYRE_GATEWAY_KEY,
> })
>
> const { text } = await generateText({
>   model: hyre('deepseek-ai/DeepSeek-V4-Flash'),
>   prompt: 'Explain impermanent loss in one paragraph.',
> })
> ```

> [tab] LangChain
>
> ```python theme={null}
> from langchain_openai import ChatOpenAI
>
> llm = ChatOpenAI(
>     base_url="https://gw.hyreagent.fun/api/inference/v1",
>     api_key=os.environ["HYRE_GATEWAY_KEY"],
>     model="deepseek-ai/DeepSeek-V4-Flash",
> )
>
> print(llm.invoke("Explain impermanent loss in one paragraph.").content)
> ```

## Streaming

Set `"stream": true` — the gateway streams standard OpenAI SSE chunks, including a final usage frame, so SDK streaming helpers work unchanged:

```python theme={null}
stream = client.chat.completions.create(
    model="zai-org/GLM-5",
    messages=[{"role": "user", "content": "Write a haiku about Solana."}],
    stream=True,
)
for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="")
```

## Supported parameters

The request schema follows OpenAI's `/chat/completions`:

| Parameter | Notes |
| - | - |
| `model` | Required — a catalog id from [`GET /models`](https://docs.hyreagent.fun/gateway/models) |
| `messages` | Required — up to 1,000 messages |
| `max_tokens` / `max_completion_tokens` | Positive integer, capped at the model's context length |
| `temperature` | `0` – `2` |
| `top_p` | `0` – `1` |
| `stop` | String or array of strings |
| `stream` | Boolean — SSE streaming |
| `tools`, `tool_choice` | Function calling, passed through to the model |
| `response_format` | e.g. JSON mode, passed through to the model |

Every response carries an `X-Request-Id` header — include it when reporting an issue.

## Next steps

> [card] [Browse the model catalog](https://docs.hyreagent.fun/gateway/models.md)
>
> 20+ models across FLASH, STANDARD, and PREMIUM tiers with live pricing.

> [card] [Limits & error handling](https://docs.hyreagent.fun/gateway/limits-and-errors.md)
>
> Daily caps, error envelope, and status codes to handle in production.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.