---
title: AI quickstart
description: Get a key, send one request to the Responses API, read the answer, stream it and make the retry safe.
type: tutorial
product: ai
summary: One request end to end, from a key to a streamed, retry-safe answer
updated: 2026-09-30
order: 1
---

Sylphx AI is one API for the models in [the catalogue](/ai/models). Requests
are the official OpenAI Responses document, so the SDKs you already use work
unchanged: only the base URL and the model id are Sylphx's.

<Prerequisites
	items={[
		'An account — see the platform start page',
		'A key that starts with sylphx_sk_, created in the console (it is shown once)',
	]}
/>

## 1. Get an API key

Create a key in the console. Every key belongs to one organization and cannot
read another organization's stored responses, files or usage. Store it as
`SYLPHX_API_KEY`, never in client-side code; a revoked key stops
authenticating at once.

```bash
export SYLPHX_API_KEY="sylphx_sk_…"
```

## 2. Send your first request

The base URL is `https://api.sylphx.ai/v1`. Name a model id from the
[catalogue](/ai/models); it is the exact string you send as `model`.

<CodeTabs>
	<CodeTab
		label="cURL"
		language="bash"
		code={`curl https://api.sylphx.ai/v1/responses \\
  -H "Authorization: Bearer $SYLPHX_API_KEY" \\
  -H "Content-Type: application/json" \\
  -d '{
    "model": "openai/gpt-5.5",
    "input": "Explain streaming in two sentences."
  }'`}
	/>
	<CodeTab
		label="TypeScript"
		language="ts"
		code={`import OpenAI from 'openai'

const client = new OpenAI({
  apiKey: process.env.SYLPHX_API_KEY,
  baseURL: 'https://api.sylphx.ai/v1',
})

const response = await client.responses.create({
  model: 'openai/gpt-5.5',
  input: 'Explain streaming in two sentences.',
})
console.log(response.output_text)`}
	/>
	<CodeTab
		label="Python"
		language="python"
		code={`import os
from openai import OpenAI

client = OpenAI(api_key=os.environ["SYLPHX_API_KEY"], base_url="https://api.sylphx.ai/v1")

response = client.responses.create(
    model="openai/gpt-5.5",
    input="Explain streaming in two sentences.",
)
print(response.output_text)`}
	/>
</CodeTabs>

Swap `model` for any id in the catalogue and the rest of the request is
unchanged.

## 3. Read the answer

You get back an official Responses object. Read four fields first: `id`,
`output`, `model` and `usage`.

```json
{
  "id": "resp_9f2c41d0a8",
  "object": "response",
  "model": "openai/gpt-5.5",
  "output": [
    {
      "type": "message",
      "role": "assistant",
      "content": [{ "type": "output_text", "text": "…", "annotations": [] }]
    }
  ],
  "usage": { "input_tokens": 18, "output_tokens": 96, "total_tokens": 114 }
}
```

- `id` identifies the response. While it is stored you can retrieve it with
  `GET /responses/{id}`, list its input items or delete it.
- `model` is exactly the id you sent, never an internal alias.
- `output` carries the assistant message and any function calls or hosted tool
  items the turn produced.
- `usage` reports the tokens the request was metered for.

Requests are stored by default so `previous_response_id` can continue a
conversation. Send `store: false` to skip persistence.

## 4. Stream the same call

Add `stream: true` and the answer arrives as server-sent events with the
official Responses event names. The stream ends exactly once, with a typed
terminal.

```bash
curl -N https://api.sylphx.ai/v1/responses \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "openai/gpt-5.5", "input": "Count to five.", "stream": true}'
```

## 5. Make retries safe

Send a UUID `Idempotency-Key` with every create you may retry. An identical
retry after completion returns the original response with the header
`idempotency-replayed: true`; the same key with a different body is refused
with `422 idempotency_key_reuse`. [Errors and retries](/docs/ai/errors) has the
whole contract.

```bash
curl https://api.sylphx.ai/v1/responses \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 00000000-0000-4000-8000-000000000000" \
  -d '{"model": "openai/gpt-5.5", "input": "Summarise this incident in three bullets."}'
```

## If the first call fails

- `401 invalid_api_key` — the bearer is missing, malformed or revoked. The
  value must start with `sylphx_sk_` and carry no quotes or whitespace.
- `404 model_not_found` — the id is not in the catalogue. Copy one from
  [the catalogue](/ai/models).
- `429 rate_limit_exceeded` — the key's request envelope is spent. Wait for
  `retry_after_seconds` (and the `Retry-After` header) before retrying.

<RelatedDocs
	links={[
		{
			href: '/docs/ai/responses',
			label: 'Responses API',
			description: 'Fields, response shape, streaming events, storage, compaction and files.',
		},
		{
			href: '/docs/ai/tools',
			label: 'Hosted tools',
			description: 'Let the model search the web or discover tools, and observe what happened.',
		},
		{
			href: '/docs/ai/catalog',
			label: 'Models, limits and data policy',
			description: 'Listing models, switching models and reading the data policy.',
		},
		{
			href: '/docs/ai/contract',
			label: 'API contract',
			description: 'Every endpoint, the key format and the encodings.',
		},
	]}
/>
