Skip to content

API

https://api.fastapi.ai/v1

Fast API exposes an OpenAI-compatible API surface.

Base URL

All endpoints in this reference are relative to:

https://api.fastapi.ai/v1

Authentication

Authenticate by providing your API key in the Authorization header:

Authorization: Bearer $FAST_API_KEY

Common headers

  • Authorization: Bearer $FAST_API_KEY
  • Content-Type: application/json (for JSON endpoints)
  • Content-Type: multipart/form-data (for file uploads)

Responses API

For most new capabilities, prefer the Responses API:

  • Create a response: POST /v1/responses
  • Retrieve a response: GET /v1/responses/{response_id}

See Responses API for details.

Streaming

Many endpoints support streaming via server-sent events (SSE).

  • Responses: set stream: true on POST /v1/responses
  • Chat Completions: set stream: true on POST /v1/chat/completions

See Streaming events for event shapes, and The error object for streaming error events.

Errors

Error responses are returned with non-2xx HTTP status codes. Streaming may also emit error events.

See Errors for the error object and debugging tips.

Example

bash
curl https://api.fastapi.ai/v1/models \
  -H "Authorization: Bearer $FAST_API_KEY"

那年我双手插兜, 让bug稳如老狗