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

# Developer Quickstart

> Make your first Hicap API request in minutes

The Hicap API gives you access to foundation models from OpenAI, Anthropic, Google Gemini, and more — through a single OpenAI-compatible endpoint. Use any standard OpenAI SDK and start building in under 5 minutes.

## 1. Get your API key

<Note>
  **Opens the Hicap Platform** — You'll create an account and generate an API key in the [Hicap Platform dashboard ↗](https://platform.hicap.ai/). Then come back here to use it.
</Note>

Export it as an environment variable:

```bash theme={null}
export HICAP_API_KEY="your_api_key_here"
```

## 2. Install an SDK and make your first request

<Tabs>
  <Tab title="JavaScript">
    ```bash theme={null}
    npm install openai
    ```

    ```javascript example.mjs theme={null}
    import OpenAI from "openai";

    const client = new OpenAI({
      baseURL: "https://api.hicap.ai/v1",
      apiKey: process.env.HICAP_API_KEY,
      defaultHeaders: { "api-key": process.env.HICAP_API_KEY },
    });

    const response = await client.chat.completions.create({
      model: "gpt-5",
      messages: [{ role: "user", content: "Write a one-sentence bedtime story about a unicorn." }],
    });

    console.log(response.choices[0].message.content);
    ```

    Run with `node example.mjs`.
  </Tab>

  <Tab title="Python">
    ```bash theme={null}
    pip install openai
    ```

    ```python example.py theme={null}
    import os
    from openai import OpenAI

    client = OpenAI(
        base_url="https://api.hicap.ai/v1",
        api_key=os.environ["HICAP_API_KEY"],
        default_headers={"api-key": os.environ["HICAP_API_KEY"]},
    )

    response = client.chat.completions.create(
        model="gpt-5",
        messages=[{"role": "user", "content": "Write a one-sentence bedtime story about a unicorn."}],
    )

    print(response.choices[0].message.content)
    ```

    Run with `python example.py`.
  </Tab>

  <Tab title="curl">
    ```bash theme={null}
    curl -s https://api.hicap.ai/v1/chat/completions \
      -H "Content-Type: application/json" \
      -H "api-key: $HICAP_API_KEY" \
      -d '{
        "model": "gpt-5",
        "messages": [{"role": "user", "content": "Write a one-sentence bedtime story about a unicorn."}]
      }'
    ```
  </Tab>
</Tabs>

That's it — you just called the Hicap API. The same code works with any [supported model](https://hicap.ai/models); just change the `model` parameter.

***

## Switch between models and providers

One API, any model. Use OpenAI, Anthropic, or Gemini models through the same endpoint and SDK — no separate integrations needed.

```python theme={null}
# OpenAI
client.chat.completions.create(model="gpt-5", messages=[...])

# Anthropic Claude
client.chat.completions.create(model="claude-sonnet-4.5", messages=[...])

# Google Gemini
client.chat.completions.create(model="gemini-2.5-pro", messages=[...])

# Moonshot Kimi
client.chat.completions.create(model="kimi-k2.5", messages=[...])
```

See all available models, context windows, and pricing → [All Models](https://hicap.ai/models) or [models.json](https://hicap.ai/models.json)

***

## Analyze images

Send image URLs directly to vision-capable models:

```javascript theme={null}
const response = await client.chat.completions.create({
  model: "gpt-5",
  messages: [{
    role: "user",
    content: [
      { type: "text", text: "What is in this image?" },
      { type: "image_url", image_url: { url: "https://example.com/photo.jpg" } },
    ],
  }],
});

console.log(response.choices[0].message.content);
```

***

## Stream responses

Use server-sent events to show results as they're generated:

```javascript theme={null}
const stream = await client.chat.completions.create({
  model: "gpt-5",
  messages: [{ role: "user", content: "Explain quantum computing in simple terms." }],
  stream: true,
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content || "");
}
```

***

## Popular endpoints

These are the most commonly used Hicap API endpoints. All follow the [OpenAI API spec](/api-reference/introduction) — if you've used the OpenAI API before, you already know how to use these.

| Endpoint                        | Description                               | Docs                                                                                     |
| ------------------------------- | ----------------------------------------- | ---------------------------------------------------------------------------------------- |
| `POST /v1/chat/completions`     | Generate text, analyze images, use tools  | [Reference →](/api-reference/endpoints/openAI/creates-a-completion-for-the-chat-message) |
| `POST /v1/embeddings`           | Create text embeddings for search and RAG | [Reference →](/api-reference/introduction#supported-endpoints)                           |
| `POST /v1/images/generations`   | Generate images with DALL·E               | [Reference →](/api-reference/introduction#supported-endpoints)                           |
| `POST /v1/audio/transcriptions` | Transcribe audio with Whisper             | [Reference →](/api-reference/introduction#supported-endpoints)                           |
| `POST /v1/audio/speech`         | Generate speech from text                 | [Reference →](/api-reference/introduction#supported-endpoints)                           |

[Full API Reference →](/api-reference/introduction)

***

## Models

Start with `gpt-5` for strong general-purpose performance, or pick a model optimized for your use case.

<CardGroup cols={3}>
  <Card title="GPT-5.5" icon="bolt" href="/providers/openai#gpt-5-5">
    OpenAI's latest flagship model for top-tier reasoning, coding, and multimodal work.
  </Card>

  <Card title="Claude Opus 4.6" icon="brain" href="/providers/anthropic#claude-opus-4-6">
    Anthropic's flagship. Deep reasoning, coding, and analysis.
  </Card>

  <Card title="Gemini 3.1 Pro" icon="sparkles" href="/providers/google#gemini-3-1-pro">
    Google's latest. 1M context, strong multimodal and reasoning.
  </Card>

  <Card title="GPT-5-mini" icon="gauge-high" href="/providers/openai#gpt-5-mini">
    Fast and affordable. Great balance of performance and cost.
  </Card>

  <Card title="Claude Haiku 4.5" icon="feather" href="/providers/anthropic#claude-haiku-4-5">
    Ultra-fast. Ideal for high-volume, latency-sensitive workloads.
  </Card>

  <Card title="Gemini 2.5 Flash" icon="bolt" href="/providers/google#gemini-2-5-flash">
    Cost-efficient with thinking capabilities. Great for real-time apps.
  </Card>
</CardGroup>

[View all models →](https://hicap.ai/models)

***

## Why Hicap?

<CardGroup cols={2}>
  <Card title="Up to 25% lower cost" icon="piggy-bank">
    We bulk-reserve compute from leading cloud providers and pass the savings to you.
  </Card>

  <Card title="One API, all providers" icon="plug">
    OpenAI, Anthropic, Gemini, Moonshot, Zhipu, MiniMax — all through one OpenAI-compatible endpoint.
  </Card>

  <Card title="5-minute integration" icon="clock">
    Use the standard OpenAI SDK. Change the base URL. You're done.
  </Card>

  <Card title="No lock-in" icon="lock-open">
    Start monthly, scale anytime. Switch models with a single parameter change.
  </Card>
</CardGroup>

***

## Next steps

<CardGroup cols={3}>
  <Card title="API Reference" icon="code" href="/api-reference/introduction">
    Full endpoint docs, authentication, and request/response schemas.
  </Card>

  <Card title="All Models" icon="table" href="https://hicap.ai/models">
    Compare all models by provider, tier, context window, and pricing.
  </Card>

  <Card title="FAQ" icon="question" href="/faq">
    Common questions about pricing, security, architecture, and data handling.
  </Card>
</CardGroup>
