FOR DEVELOPERS
Build with the AI Gateway
One API gateway for your application’s AI requests. Start with an application API key and let your configured routing policy choose an eligible model.
import os
from uuid import uuid4
from openai import OpenAI
client = OpenAI(
api_key=os.environ["TASKWAY_API_KEY"],
base_url=os.environ["TASKWAY_BASE_URL"],
)
request_id = str(uuid4())
completion = client.chat.completions.create(
model="auto",
messages=[dict(role="user", content="Hello, gateway!")],
extra_headers=dict([("Idempotency-Key", request_id)]),
)
# completion.choices[0].message.contentThe gateway supports a defined subset of the OpenAI API. Check the compatibility guide for available models, parameters, and features.
Read compatibility →01
Open quickstart ↗GET STARTED
Make your first request
›_↗◇↗⌁↗
Quickstart
Use the official OpenAI SDK with your workspace gateway
Overview
How Taskway connects your application to configured AI models through an OpenAI-compatible API.
Models and routing
Use the model aliases that select an application's routing policy, or pin a concrete model visible to that application.
02
API SURFACE
Choose an API for your task
POST
/v1/chat/completionsChat CompletionsSend stateless text-generation requests through POST /v1/chat/completions using familiar OpenAI SDK methods.↗POST/v1/responsesResponses and conversation stateCreate OpenAI-compatible Responses and continue a stored response chain within the same application.↗POST/v1/embeddingsEmbeddingsTurn text or token IDs into vectors with a supported embedding model visible to your application.↗POST · GET · DELETE/v1/filesFiles and attachmentsUpload supported files once and reference the file ID from an application-scoped Chat Completions request.↗