Skip to content
Console
On this page

AI quickstart

One request end to end, from a key to a streamed, retry-safe answer

Sylphx AI is one API for the models in the catalogue. 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.

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.

Shell
export SYLPHX_API_KEY="sylphx_sk_…"

2. Send your first request

The base URL is https://api.sylphx.com/v1. Name a model id from the catalogue; it is the exact string you send as model.

curl https://api.sylphx.com/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."
}'

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.

Shell
curl -N https://api.sylphx.com/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 has the whole contract.

Shell
curl https://api.sylphx.com/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.
  • 429 rate_limit_exceeded — the key's request envelope is spent. Wait for retry_after_seconds (and the Retry-After header) before retrying.