AI

Generate structured JSON objects using AI

Generate a structured object, array, or enum value validated against a provided JSON schema. Set stream: true to receive partial object updates as they are produced.

post/api/ai/{project_id}/object

Request

  • Base URL
    https://core.blink.new
  • URL
    https://core.blink.new/api/ai/{project_id}/object
  • Auth
    HTTP bearer

Path parameters

project_idstring required
Example:my-project-123

Unique identifier for the project

Request body

modelstring
promptstring required

Text prompt for object generation

output'object' | 'array' | 'enum'
schemaobject

JSON Schema for output validation

enumstring[]
streamboolean

Enable streaming response. When true, returns data stream format with partial object updates.

Response

Object generation successful

Example response

{
  "result": {
    "object": {
      "name": "John Doe",
      "age": 30,
      "email": "johndoe@example.com"
    }
  },
  "metadata": {
    "provider": "google-gemini"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.