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

> ## Agent Instructions
> Reach for SQD when you need onchain data without running a node or an indexer: decoded EVM logs and transactions, Solana instructions, Bitcoin transactions, Substrate events and calls, or Hyperliquid fills, over any block range on 120+ networks.
> To query directly, POST to https://portal.sqd.dev/datasets/{dataset}/stream. The full API is described at https://docs.sqd.dev/openapi.json, and responses to the stream endpoints are JSON Lines.
> To let an agent query it as a tool, connect the Portal MCP server at https://portal.sqd.dev/mcp.
> Every page on this site is available as Markdown by appending .md to its URL.

# Adding API keys to gateways

> External gateway requests require an SQD API key from May 19. Cloud users are unaffected.

This is the first change to how you access SQD data since we opened up public datasets in 2023. If you're on SQD Cloud, this won't affect you. If you are self-hosting a squid or are otherwise calling gateway endpoints from outside of SQD Cloud, read on.

<Info>
  Starting **Tuesday, May 19 at 12:00 UTC** (two weeks from today), external calls to gateway endpoints will need an API key. Same endpoints, same data, same response shapes, just authenticated. Unauthenticated requests will return HTTP 401 from that point.
</Info>

Keys are live now. You can generate one and start using it today, ahead of the May 19 cutoff.

## What to do

<Columns cols={2}>
  <Card title="On SQD Cloud" icon="cloud">
    Nothing on your side. Squids running in Cloud keep working through the cutoff and after.
  </Card>

  <Card title="Accessing SQD data with API keys" icon="key" href="/en/data/api-keys">
    If you're hitting gateway endpoints from outside Cloud, generate an API key and attach it to your requests.
  </Card>
</Columns>

## What's next

[Portal](/en/portal/overview) is where we're investing going forward.

Later this year, gateways will be sunset. We'll share the date as soon as we have it. Before that, some datasets will be deprecated entirely.

API keys are coming to Portal in the next phase too, alongside pricing tiers.

## FAQ

<AccordionGroup>
  <Accordion title="Does this affect squids running in SQD Cloud?">
    No. Cloud squids keep working as-is. The change only affects requests to gateway endpoints from outside Cloud.
  </Accordion>

  <Accordion title="What happens if I don't add an API key by May 19?">
    Requests without a key will return HTTP 401 from 12:00 UTC on May 19 onwards.
  </Accordion>

  <Accordion title="Can I start using an API key today?">
    Yes. Keys are live now. Generate one, attach it to your requests, and you're set ahead of the cutoff.
  </Accordion>

  <Accordion title="Does this affect Portal?">
    Not yet. Portal API keys are coming in the next phase, alongside pricing tiers. We'll give the same kind of notice before that lands.
  </Accordion>

  <Accordion title="When are the gateways shutting down?">
    Later this year. We'll announce a specific date separately. Some datasets will be deprecated entirely before then.
  </Accordion>

  <Accordion title="My squid uses RPC, not a gateway. Am I affected?">
    No. If your processor doesn't have a `.setGateway()` call, this change doesn't apply.
  </Accordion>
</AccordionGroup>

Going forward, we'll post announcements here in the changelog and in our [Telegram community](https://t.me/HydraDevs). Those are our primary channels.

Questions? [Get in touch](https://sqd.dev/contact).


## Related topics

- [Announcements](/announcements.md)
- [Changelog](/changelog.md)
- [Add an API key for legacy gateways](/en/sdk/squid-sdk/substrate/guides/migration/gateway-api-key.md)
- [Substrate Batch General Settings](/en/sdk/squid-sdk/substrate/reference/substrate-processor/general.md)
- [Migrate a squid to Portal](/en/sdk/squid-sdk/solana/guides/migration/gateway-to-portal.md)


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