AI
Chat completions (OpenAI-compatible)
OpenAI-compatible chat completions endpoint. Use your Blink workspace API key (or, from a Blink backend, the backend AI key env.BLINK_BACKEND_AI_KEY) in place of an OpenAI key. The default model is anthropic/claude-sonnet-4.6. response_format: { type: "json_object" } is silently converted to no format constraint — use json_schema instead. For streaming requests, stream_options.include_usage is injected automatically.
post/api/v1/ai/chat/completions
Request
- Base URLhttps://core.blink.new
- URLhttps://core.blink.new/api/v1/ai/chat/completions
- Auth
- HTTP bearer
- or HTTP bearer
Request body
Example request
{
"model": "anthropic/claude-haiku-4.5",
"messages": [
{
"content": [
{
"image": "https://example.com/image.jpg"
}
]
}
]
}Response
Chat completion response (OpenAI format). When stream: true, returns text/event-stream SSE data ending with [DONE].
Example response
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 1694268190,
"model": "claude-sonnet-4-6-20250514",
"choices": [
{
"message": {
"content": [
{
"image": "https://example.com/image.jpg"
}
]
}
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.